:root {
  --purple: #662d91;
  --pink: #EC008C;
  --green: #8DC63F;
  --cyan: #4BC0B1;
  --navy: #262262;
  --yellow: #FFD700;
  --black: #051212;
  --white: #f9fafb;
  --offwhite: #f7f7f7;
  --whitetransparent: #f9fafbd0;
  --whitemoretransparent: #f9fafb80;
  --lightgray: #eeeeee;
  --red: #d61f3b;
  --purpletrans: #662d91aa;
  --yellowtrans: #FFD700aa;
  --greentrans: #9dc63faa;
  --cyantrans: #4BC0B1aa;
  --pinktrans: #EC008Caa;
  --textareabackground: #e2e2e2;
  --buttonprimary: #FFCB05;
}

body {
  background-color: var(--offwhite)!important;
  color: var(--black);
}
@media screen and (orientation:portrait) {
  .supermebg {
    background-color: var(--white);
    min-height: 100vh;
  }
}

@media screen and (orientation:landscape) {
  .supermebg {
    background-color: var(--white);
    min-height: 100vh;
  }
}
.text-purple {
  color: var(--purple)!important;
}
.text-pink {
  color: var(--pink)!important;
}
.text-green {
  color: var(--green)!important;
}
.text-cyan {
  color: var(--cyan)!important;
}
.text-navy {
  color: var(--navy)!important;
}
.text-red {
  color: var(--red)!important;
}
.text-white {
  color:var(--white)!important;
}
.text-black {
  color:var(--black)!important;
}
.text-yellow {
  color: var(--yellow)!important;
}
.text-heading1 {
  color:var(--white)!important;
  font-weight: 500;
  line-height: 1.2;
  font-size: calc(1.375rem + 1.5vw);
}
.text-heading2 {
  color:var(--white)!important;
  font-weight: 500;
  line-height: 1.2;
  font-size: calc(1.325rem + .9vw);
}
.text-heading3 {
  color:var(--white)!important;
  font-weight: bold;
  font-size: calc(1.3rem + .6vw);
  font-weight: 500;
  line-height: 1.2;
}
.text-heading3-black {
  color:var(--black)!important;
  font-weight: bold;
  font-size: calc(1.3rem + .6vw);
  font-weight: 500;
  line-height: 1.2;
}
.text-heading4 {
  color:var(--cyan)!important;
  font-weight: 500;
  line-height: 1.2;
  font-size: calc(1.275rem + .3vw);
}
.bg-purple {
  background: var(--purple)!important;
}
.bg-purple-transparent {
  background: var(--purpletrans)!important;
}
.bg-yellow {
  background: var(--yellow)!important;
}
.bg-yellow-transparent {
  background: var(--yellowtrans)!important;
}
.bg-pink {
  background: var(--pink)!important;
}
.bg-pink-transparent {
  background: var(--pinktrans)!important;
}
.bg-green {
  background: var(--green)!important;
}
.bg-green-transparent {
  background: var(--greentrans)!important;
}
.bg-cyan {
  background: var(--cyan)!important;
}
.bg-cyan-transparent {
  background: var(--cyantrans)!important;
}
.bg-navy {
  background: var(--navy)!important;
}
.bg-white-transparent {
  background: var(--whitetransparent)!important;
}
h3, .h3 {
  font-weight: bold;
}
h4, .h4 {
  font-weight: bold;
}
.fa15x {
  font-size: 1.5em;
}
.fa-3x {
  font-size: 3em;
}
.pr-0 {
  padding-right: 0px;
}
.pl-0 {
  padding-left: 0px;
}
.p-05 {
  padding: 0.5em;
}
.margin-top-8 {
  margin-top: 8px;
}
.margin-top-16 {
  margin-top: 16px;
}

.space1 {
  height: 1em;
}
.space2 {
  height: 2em;
}
.space2-5 {
  height: 2.5em;
}
.space3 {
  height: 3em;
}
.frontpageimage {
  width: 100%;
  max-width: 200px;
}
.pwwitheye {
  padding: 4px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.cta {
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 12px 16px;
  min-height: 48px;
  margin-top: auto;
  border: 1px solid var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cta-pink {
  background-color: var(--pink)!important;
  color: var(--white)!important;
}
.cta-green {
  background-color: var(--green)!important;
  color: var(--black)!important;
}

.h100 {
  height: 100%;
}

.mw-1200-m-auto {
  max-width: 1150px;
  margin:auto;
}

.mw-index {
  max-width: 728px;
}

/* Links */
.md_lnk a {
  text-align: left;
  color: var(--white)!important;
  text-decoration: none;
}
.md_lnk a:hover {
  color: var(--red);
  text-decoration: none;
}
.md_lnkb a {
  text-align: left;
  color: var(--black)!important;
  text-decoration: none;
}
.md_lnkb a:hover {
  color: var(--red);
  text-decoration: none;
}

/*.main {
    background-color: #111 !important;
    color:var(--red) !important;
    padding: 16px;
    margin-bottom: 30px;
}*/

/* menu */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--yellow);
  z-index: 10000;
  padding: 2px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.topnav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  position: relative;
}

.topnav a {
  color: var(--black);
  text-decoration: none;
  display: inline-block;
  z-index: 2;
}

.topnav a.menu {
  padding: 12px;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topnav a.login {
  padding: 12px;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topnav a.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10002;
}

.topnav a.logo img {
  height: 42px;
  width: auto;
  vertical-align: middle;
}

.active {
  background-color: var(--green);
  color: var(--white);
  text-align: center;
}
.topnav .fa {
  color: var(--black);
}

.bottomnav {
  overflow: auto;
  background-color: var(--navy);
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 1200px;
  justify-content: center;
  z-index: 1000;
}

.bottomnav a {
  float: left;
  display: block;
  color: var(--white);
  padding: 12px 0px;
  min-height: 48px;
  text-decoration: none;
  font-size: 17px;
  width: 20%; /* Four equal-width links. If you have two links, use 50%, and 33.33% for three links, etc.. */
  text-align: center; /* If you want the text to be centered */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.bottomnav a:hover {
  background: var(--white);
  color: var(--black);
}

.bottomnav a.active {
  background-color: var(--purple);
  color: var(--black);
}

.bottomspace {
  height: 40px;
}

.mobile-container {
  padding-top: 80px;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  background-color: var(--offwhite)!important;
}
.breadcrumbs {
  font-size: 0.7rem;
  color: var(--black)!important;
}
.breadcrumbs a {
  color: var(--black)!important;
}
.text-pink a {
  color: var(--pink)!important;
}
.adminlist a {
  color: var(--black)!important;
}
.adminlist {
  border-bottom: 1px solid #888; /* Custom thickness and colour */
}
.corners {
  border-radius: 0.5em;
}
.width100 {
  width: 100%;
}
.videoiframe {
  width:100%;
  height:auto;
  min-height:240px;
}
.sublist {
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 4px;
}
.admincontainer {
  padding: 20px;
  font-size: 14px;
}
.box {
  border-radius: 0.5em;
}
.boxtc {
  border-top-left-radius: 0.5em;
  border-top-right-radius: 0.5em;
 }
.boxbc {
  border-bottom-left-radius: 0.5em;
  border-bottom-right-radius: 0.5em;
}
.purplecard {
  background-color: var(--purpletrans);
  border-radius: 0.5em;
  color: var(--white);
  min-height: 100%;
  border: 1px solid var(--whitemoretransparent);
}
.white-border-1 {
  border: 1px solid var(--whitemoretransparent);
}
.black-border-1 {
  border: 1px solid var(--black);
}
.pink-border-1 {
  border: 1px solid var(--pink);
}
.green-border-1 {
  border: 1px solid var(--green);
}
.navy-border-1 {
  border: 1px solid var(--navy);
}
.cyan-border-1 {
  border: 1px solid var(--cyan);
}
.purplebox {
  background-color: var(--purpletrans);
  border-radius: 0.5em;
  color: var(--white);
}
.greenbox {
  background-color: var(--greentrans);
  border-radius: 0.5em;
  color: var(--white);
}
.pinkbox {
  background-color: var(--pinktrans);
  border-radius: 0.5em;
  color: var(--white);
}
.purpleboxtc {
  background-color: var(--purple);
  border-top-left-radius: 0.5em;
  border-top-right-radius: 0.5em;
  color: var(--white);
}
.purpleboxbc {
  background-color: var(--purple);
  border-bottom-left-radius: 0.5em;
  border-bottom-right-radius: 0.5em;
  color: var(--white);
}

.sublistbtn {
  margin:auto;
}

.categoryimage {
  max-width: 100%;
  border-radius: 0.5em;
  height: auto;
  margin-bottom: 10px;
  border: 1px solid var(--whitemoretransparent);
  opacity: 0.8;
}

.aaimage {
  border-radius: 0.5em;
  margin-bottom: 10px;
  border: 1px solid var(--whitemoretransparent);
  max-width: 100%;
}
.compimg {
  border-radius: 0.5em;
  margin-bottom: 10px;
  border: 1px solid var(--whitemoretransparent);
  max-width: 100%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 0 2px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.1);
  
}

.compimgfill {
    display: block;  /* Removes default inline spacing */
    margin: 0;       /* Removes any margin */
    padding: 0;      /* Removes any padding */
    width: 100%;     /* Makes image fill container width */
    height: 100%;    /* Makes image fill container height */
    border-radius: 0.5em; /* Rounded corners */
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 0 2px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.1);
    object-fit: cover; /* Ensures image covers the area without distortion */
    vertical-align: bottom; /* Removes any bottom spacing */
}

.skillimage {
  max-width:100%;
  border-radius: 0.5em;
  height: auto;
  opacity: 0.8;
}
.msisdn {
  padding: 24px;
  text-align: center;
}
.profileinputs {
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 4px;
}
.fontsmaller {
  font-size: smaller;
}
.h4size {
  font-size: 1.1rem;
}
.menudropdown {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100vh;
  background-color: var(--yellow);
  transition: left 0.3s ease-in-out;
  z-index: 9999;
  padding-top: 60px;
  overflow-y: auto;
  max-height: 100vh;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.menudropdown .menu {
  position: absolute;
  top: 10px;
  left: 15px;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  border-bottom: none;
}

.menudropdown.show {
  left: 0;
}

.menudropdown a:not(.menu) {
  color: var(--black);
  padding: 20px 24px;
  min-height: 48px;
  text-decoration: none;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.menudropdown a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Category & Skill butttons */
.csbtn {
  color:var(--white);
  min-height: 48px;
  height: 53px;
  width: 100%;
  max-width: 435px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: 0.5em;
  text-decoration: none;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* Category & Skill Percentage Text */
.csperctxt
{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  color: var(--navy);
  font-size: 14px;
  pointer-events: none;
}



.frontpagecardtext {
  min-height: 56px;
  font-size: 1.5rem;
}
.bigbutton {
  min-height: 10px;
}

@media screen and (min-width: 575px) {
  .frontpagecardtext {
    min-height: 79px;
    font-size: 1.1rem;
  }
  .bigbutton {
    min-height: 10px;
  }
}

@media screen and (min-width: 768px) {
  .frontpagecardtext {
    min-height: 79px;
    font-size: 1.1rem;
  }
  .bigbutton {
    min-height: 10px;
  }
}

@media screen and (min-width: 992px) {
  .frontpagecardtext {
    min-height: 98px;
    font-size: 1.1rem;
  }
  .bigbutton {
    min-height: 10px;
  }
}

.searchresultblock {
  max-width: 100%;
  border-radius: 0.5em;
  height: auto;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--whitemoretransparent);
}

#localvideo {
  min-width: 100%;
  height: auto;
  border-radius: 0.5em;
}

.videooverlay {
  position:absolute;
  top:45%;
  left:auto;
  z-index:1;
}

.fontsize10vw {
  font-size: 12vmin;
}

.whitebox {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  color: var(--black);
  background-color: var(--white);
  border-radius: 0.5em;
  box-shadow: 0 2px 3px rgba(0,0,0,0.25);
  border: 1px solid var(--lightgray);
}
.whitecard {
  font-family: 'Inter', sans-serif;
  background-color: var(--white);
  color: var(--black);
  border-radius: 0.5em;
  min-height: 100%;
  border: 0px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.25);
  border: 1px solid var(--lightgray);
}
/* New styles for congratulations.mustache */
textarea {
    width: 100%;
    border-radius: 8px;
    background-color: var(--textareabackground);
}

.save-button-class {
    /* Placeholder styles; update as needed */
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Remove chatbot styles */

/* Profile */
.mtn-title {
  color:var(--black)!important;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: calc(1.3rem + .6vw);
  line-height: 1.2;
}

.mtn-button-primary {
  background: var(--buttonprimary);
  border-radius: 20px;
  color: var(--black);
  min-height: 48px;
  padding: 12px 24px;
}
/* 
  .mtn-button-yellow is intended as a variant of .mtn-button-primary.
  Use both classes together in HTML for correct styling:
  <button class="mtn-button-primary mtn-button-yellow">Save</button>
*/
.mtn-button-yellow {
  padding-left: 28px;
  padding-right: 28px;
  font-weight: 500;
}

.mtn-button-secondary {
  padding: 12px 24px;
  min-height: 48px;
  background: #FFFFFF;
  border: 1px solid #CBCBCB;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  color: #757575;
}

.mtn-button-outline {
  border: 1px solid #000000;
}

.mtn-button-dark {
  background: var(--black);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  color: #F5F5F5;
  flex: none;
  order: 1;
  flex-grow: 0;
  min-height: 48px;
  padding: 12px 24px;
}
.mtn-button-dark a:hover {
  color: var(--red);
  text-decoration: none;
}
a.btn.mtn-button-dark:hover,
a.btn.mtn-button-dark:focus {
    background: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
    box-shadow: none !important;
    text-decoration: none !important;
    /* Add or override any other hover styles as needed */
}
.yellowbox {
  background-color: var(--yellowtrans);
  border-radius: 0.5em;
  color: var(--black);
}
.profile-text-heading4 {
  color:var(--black)!important;
  font-weight: 500;
  line-height: 1.2;
  font-size: calc(1.275rem + .3vw);
}

/* Entries multicolumn */
.entry-container {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  color: var(--black);
  background-color: var(--white);
  border-radius: 0.5em;
  box-shadow: 0 2px 3px rgba(0,0,0,0.25);
  display: inline-flex;
  padding: 16px;
}

.left-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.entry-label {
    font-family: 'Inter', sans-serif;
    font-size: calc(11px + (14 - 11) * ((100vw - 320px) / (1200 - 320)));
    font-weight: 500;
}
.entrydetail-label {
    font-family: 'Inter', sans-serif;
    font-size: 1.2em;
    font-weight: 500;
}
.entry-number {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 58px;
    color: var(--yellow);
}

.right-column {
    display: flex;
    align-items: flex-end;
}
     
.entry-description {
    font-family: 'Inter', sans-serif;
    font-size: calc(16px + (22 - 16) * ((100vw - 320px) / (1200 - 320)));
    line-height: 100%;
    margin-left: 8px;
}
.interfont {
    font-family: 'Inter', sans-serif !important;
}
/* Info Text */
.info-text {
  font-family: 'Albert Sans', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  text-align: center;
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.search-container {
    position: relative;
}
.search-container::after {
    content: "🔍";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.search-container.searching::after {
    display: none;
}
.search-input {
    padding-right: 40px;
    border: 2px solid #212529;
}
.search-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    padding: 0;
    border: none;
    background: none;
    color: #212529;
}
.categories-scroll-container {
    margin: 0 -15px;
    padding: 0 15px;
}
.categories-scroll-container .d-flex {
    cursor: grab;
    user-select: none;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}
.categories-scroll-container .d-flex::-webkit-scrollbar {
    display: none;             /* Chrome, Safari and Opera */
}
.categories-scroll-container .d-flex:active {
    cursor: grabbing;
}
.category-pill {
    background: transparent !important;
    transition: box-shadow 0.2s, transform 0.2s;
}
.category-pill.active {
    background: transparent !important;
}
.btn-light {
    border: 1px solid #e0e0e0;
    background-color: white;
    transition: all 0.2s ease-in-out;
    min-height: 48px;
    padding: 12px 20px;
}
.category-pill:hover .btn {
    background-color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(117, 117, 117, 0.4);
}
.category-pill.active .btn {
    border: 0px;
    color:rgb(0, 0, 0);
    font-weight: 500;
    background-color: var(--yellow);
    box-shadow: 0 2px 4px rgba(117, 117, 117, 0.4);
}
.skills-container {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.3s ease-out forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.skillimage {
    transition: transform 0.2s ease-in-out;
}
.skillimage:hover {
    transform: scale(1.05);
}
.loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    margin: 20px auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-spinner.show {
    display: block;
}
.skillcard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 24px 20px;
    margin-bottom: 16px;
}
.skillcard-small {
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 12px;
    margin: 8px;
}
.skillcard-label {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #222;
    line-height: 1.2;
}
.skillcard-label-small {
  font-size: 14px;
  font-weight: 500;
}
.truncate-text {
  white-space: nowrap;         /* Prevents text from wrapping */
  overflow: hidden;            /* Hides overflowed text */
  text-overflow: ellipsis;     /* Shows '...' when text is truncated */
  max-width: 100%;             /* Ensures it doesn't grow beyond its container */
  display: block;              /* Or inline-block/flex as needed */
}
.skillcard-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-left: 16px;
}
.skillcard-link {
    text-decoration: none;
    display: block;
}
.skillcard-link .skillcard {
  /* ...your existing .card styles... */
    transition: box-shadow 0.2s;
    transition: transform 0.2s ease-in-out;
}
.skillcard-link:hover .skillcard {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: scale(1.05);
    cursor: pointer;
}
.modulecard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px; /* space between header and progress bar */
}
.modulecard {
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 12px 20px;
    margin-bottom: 16px;
}
.modulecard-icon-yellow {
    vertical-align: middle;
    display: inline-block;
    color: var(--yellow)!important;
    /* Optional: adjust icon size or line-height if needed */
}
.modulecard-icon-black {
  vertical-align: middle;
  display: inline-block;
  color: var(--black)!important;
  /* Optional: adjust icon size or line-height if needed */
}
.yellowboxbc {
  background-color: var(--yellow);
  border-bottom-left-radius: 0.5em;
  border-bottom-right-radius: 0.5em;
  color: var(--white);
}
.pb-yellow {
  height: 4px;
}
.pb-yellow:hover {
  cursor: pointer;
}
.modulecard a {
  text-decoration: none !important;
}
.feedback-form{
  background-color: var(--white);
  padding: 12px;
}

/* Menu overlay backdrop */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: none;
  transition: opacity 0.3s ease-in-out;
}

.menu-overlay.show {
  display: block;
}

/* Ensure all buttons meet minimum touch target */
button, 
a.btn, 
input[type="submit"], 
input[type="button"], 
.btn {
  min-height: 48px;
  min-width: 48px;
}

/* Ensure icon-only links meet minimum touch target */
a > i.fa:first-child:last-child,
a > .fa:first-child:last-child {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  line-height: 44px;
  text-align: center;
}

/* Icon links need proper click area */
a:not(.btn):not(.csbtn):not(.cta):has(> i.fa) {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

/* Fallback for browsers without :has() support */
a[href*="admin"] > i.fa,
a[href*="topic.php"] > i.fa,
a[href*="module.php"] > i.fa {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  line-height: 44px;
  text-align: center;
}

/* Check circle and other module icons */
.fa-check-circle-o,
.fa-check-circle,
.fa-circle-o {
  cursor: pointer;
}

/* Topic completion icons to match skill card size */
.topic-completion-icon {
  font-size: 3.5em; /* Exactly 56px (3.5 * 16px base font) */
  vertical-align: middle;
  margin-right: 8px;
}

/* Module page topic status icons (check and play buttons) */
.module-topic-icon {
  font-size: 3.5em; /* Exactly 56px (3.5 * 16px base font) */
  vertical-align: middle;
}

/* Ensure edit icons have proper touch area */
.fa-pencil-square-o {
  padding: 4px;
}

/* Fix icon alignment in admin lists */
.adminlist .fa-eye,
.adminlist .fa-pencil-square-o {
  padding: 4px;
  vertical-align: middle;
}

/* Admin list icon spacing */
.adminlist-eye-icon {
  margin-right: 10px;
}

.adminlist-edit-icon {
  /* No margin needed for last icon */
}

/* Body scroll lock when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Improve mobile tap highlights */
a, button, .btn, input[type="submit"], input[type="button"] {
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

/* Ensure form inputs are touch-friendly */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
  font-size: 16px; /* Prevents zoom on iOS */
  min-height: 48px;
  padding: 12px;
}

/* Improve mobile menu link spacing */
@media (max-width: 768px) {
  .menudropdown a:not(.menu) {
    padding: 24px 24px;
    font-size: 18px;
  }
  
  /* Ensure profile image buttons are touch-friendly */
  .sublistbtn {
    min-height: 48px;
    min-width: 48px;
  }
  
  /* Improve mobile font sizes for better readability */
  body {
    font-size: 16px;
  }
  
  /* Ensure all interactive elements meet minimum size */
  a, .md_lnk a, .md_lnkb a {
    display: inline-block;
    min-height: 44px;
    padding: 8px;
  }
  
  /* Increase icon sizes on mobile devices */
  .skillcard-icon {
    width: 60px;
    height: 60px;
  }
}

/* Fix for small phone devices (320px width) */
@media (max-width: 375px) {
  .topnav-content {
    padding: 0 10px;
  }
  
  .topnav a.logo img {
    height: 36px;
  }
  
  .menudropdown {
    width: 220px;
    left: -220px;
  }
  
  .bottomnav a {
    font-size: 14px;
    padding: 10px 0;
  }
  
  /* Slightly smaller icons for very small screens */
  .skillcard-icon {
    width: 52px;
    height: 52px;
  }
}

/* iPad-specific fixes (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Ensure all icon links meet minimum touch target */
  a > i.fa, 
  a > .fa {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
    text-align: center;
  }
  
  /* Icon-only links need proper touch area */
  a:has(> i.fa:only-child),
  a:has(> .fa:only-child) {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    text-align: center;
  }
  
  /* Module check circle icons */
  .modulecard a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Edit pencil icons */
  a[href*="admin"] {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
  }
  
  /* Navigation arrows */
  a > i.fa-arrow-up,
  a > i.fa-arrow-left,
  a > i.fa-arrow-right,
  a > i.fa-arrow-down {
    padding: 8px;
  }
  
  /* Category pills spacing */
  .category-pill {
    margin: 0 4px;
  }
  
  .category-pill .btn {
    min-height: 48px;
    padding: 12px 20px;
  }
  
  /* Video overlay touch area */
  .videooverlay {
    min-width: 60px;
    min-height: 60px;
    padding: 8px;
  }
}

/* iPad Air specific (820px width) */
@media (width: 820px) {
  /* Extra padding for better touch targets on iPad Air */
  a > i.fa {
    padding: 2px;
  }
  
  /* Ensure menu dropdown links are properly sized */
  .menudropdown a i {
    min-width: 44px;
  }
}

/* Mobile text alignment fix for topic links - covers all devices up to iPad Air */
@media (max-width: 820px) {
  /* Topic links in congratulations and module pages */
  .topic-link-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 44px;
  }
  
  .topic-link-container i.fa {
    flex-shrink: 0;
    margin-top: 2px;
  }
  
  .topic-link-container .topic-text {
    flex: 1;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Also apply to module page topic rows */
  .module-topic-row {
    display: flex;
    align-items: flex-start;
    min-height: 44px;
  }
  
  .module-topic-row .col-10 {
    display: flex;
    align-items: flex-start;
  }
  
  .module-topic-row .col-2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}