@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --color-background: #fff;
  --color-primary: #8bc53f;
  --color-secondary: #5c9a0c;
  --color-text-primary: #1d1e1e;
  --color-text-secondary: #4b4c4c;
  --color-grey1: #888888;
  --color-grey2: #d8dce1;
}

* {
  border: medium none;
  margin: 0;
  padding: 0;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  float: none;
}
*:hover,
*:active,
*:focus {
  outline: none !important;
}
html {
  height: 100%;
}

body {
  background: var(--color-background);
  height: 100%;
  color: #000;
  font: normal 14px "Open Sans", sans-serif;
}
a {
  color: #000;
  outline: medium none;
  text-decoration: none;
}
a:hover,
a:active,
a:focus {
  color: inherit;
  text-decoration: none;
}

header {
  position: relative;
  width: 100%;
  background-color: var(--color-text-primary);
}
header .container {
  padding: 0;
}

.coverImage {
  width: 100%;
  min-height: 240px;
  background-image: url("images/headerImage.png");
  background-repeat: no-repeat;
  background-position: 60% 0;
  background-size: cover;
}

.headerTextContainer {
  padding: 0 16px;
  width: 100%;
  height: 100%;
  background-color: var(--color-text-primary);
  box-sizing: border-box;
}

.logo {
  width: auto;
  height: 30px;
}

header .logo {
  margin-top: 20px;
}

h1 {
  color: #ffffff;
  font: 700 48px/56px "Open Sans", sans-serif;
  margin-top: 57px;
}

span.line {
  color: var(--color-primary);
}

h1 + P {
  color: var(--color-background);
  font: 400 16px/22px "Open Sans", sans-serif;
  margin-top: 20px;
  margin-bottom: 30px;
  padding: 0;
}

/* Adding new styles for links in the header paragraph */
h1 + p a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

h1 + p a:hover,
h1 + p a:focus {
  color: var(--color-secondary);
}

@media (min-width: 768px) {
  .headerTextContainer {
    padding: 0 46px;
  }

  header .logo {
    margin-top: 40px;
  }

  h1 {
    margin-top: 80px;
    font-size: 66px;
    line-height: 76px;
  }

  h1 + P {
    margin-top: 28px;
    margin-bottom: 92px;
  }

  .coverImage {
    min-height: calc((100vw - 360px) * 0.24 + 240px);
  }
}

@media (min-width: 1280px) {
  header {
    height: 460px;
  }

  .headerTextContainer {
    padding: 0 16px 0 0;
    width: 55%;
  }

  h1 {
    margin-top: 100px;
  }

  h1 + P {
    margin-top: 28px;
    margin-bottom: 32px;
  }

  .coverImage {
    width: 45%;
    min-height: 100%;
    position: absolute;
    top: 0;
    right: 0;
  }
}

.container {
  width: 100%;
  padding: 0 16px;
  margin: 0;
}
@media (min-width: 768px) {
  .container {
    padding: 0 46px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
    padding: 0;
    margin: 0 auto;
  }
}

.tabs {
  margin: 60px 0;
  width: 100%;
}
.description {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 30px;
}
.description h2 {
  color: var(--color-text-primary);
  font: 700 24px/32px "Open Sans", sans-serif;
}
.description p {
  color: var(--color-text-secondary);
  font: 400 14px/22px "Open Sans", sans-serif;
}
.chapter-index {
  color: #a2d45e;
  padding-right: 12px;
}

@media (min-width: 361px) {
  .description h2 {
    font-size: 38px;
    line-height: 48px;
  }
  .description p {
    font-size: 16px;
  }
  .chapter-index {
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  .description h2 {
    padding-bottom: 15px;
  }
}

@media (min-width: 768px) {
  .tabs {
    margin: 100px 0;
  }
  .description {
    flex-direction: row;
  }
  .description h2 {
    margin: 0;
    width: 60%;
  }
  .description p {
    margin: 15px 0 40px 20px;
  }
}

@media (min-width: 1280px) {
  .tabs {
    margin: 120px 0;
  }
  .description h2 {
    width: 50%;
  }
}

@media (min-width: 1920px) {
  .tabs {
    margin: 150px 0;
  }
  .description h2 {
    width: 50%;
  }
}
.tabNav {
  display: none;
}
.tabHead {
  position: relative;
  background: url(images/trainee.png) no-repeat 15px center
    var(--color-background);
  background-size: auto 32px;
  height: 63px;
  padding: 3px 10px 0 65px;
  border: 1px solid var(--color-text-primary);
  margin: 0;
  font: 700 14px/20px "Open Sans", sans-serif;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
}
.tabHead1 {
  margin: 0;
}
.tabHead2 {
  background-image: url(images/jun.png);
  border-top: none;
}
.tabHead3 {
  background-image: url(images/mid.png);
  background-size: auto 36px;
  border-top: none;
}
.tabHead4 {
  background-image: url(images/senior.png);
  border-top: none;
}
.tabHead5 {
  background-image: url(images/expert.png);
  border-top: none;
}
.tabHead.active:after,
.tabHead:hover:after {
  position: absolute;
  content: "";
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: var(--color-primary);
}

.tabHead1.active {
  background-image: url(images/trainee.png);
}
.tabHead2.active {
  background-image: url(images/jun.png);
}
.tabHead3.active {
  background-image: url(images/mid.png);
}
.tabHead4.active {
  background-image: url(images/senior.png);
}
.tabHead5.active {
  background-image: url(images/expert.png);
}
.tabEl {
  padding: 20px;
  display: none;
  border: 1px solid var(--color-text-primary);
  border-top: none;
}

.tabEl li {
  list-style: none;
  margin-left: 0;
  position: relative;
  padding-left: 20px;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 8px;
}

.tabEl > li::before,
.tabEl ul li::before {
  display: none; /* bullet now rendered via .bullet-icon span */
}

/* New styles for nested lists */
.tabEl ul {
  margin-left: 20px;
}

.tabEl ul li {
  margin-bottom: 4px;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .tabs + .tabs {
    padding: 50px 0 0;
  }
  .tabHead {
    display: none;
  }
  .tabNav {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    align-items: end;
  }
  .tabNavEl {
    position: relative;
    background: url(images/trainee.png) no-repeat center 70px
      var(--color-background);
    background-size: auto 50px;
    background-position: 15px 15px;
    padding: 115px 15px 15px;
    font: 700 18px/26px "Open Sans", sans-serif;
    text-align: start;
    border: 1px solid var(--color-text-primary);
    border-right: none;
    transition: background-color ease 0.3s;
    cursor: pointer;
    text-align: bottom;
  }
  .tabNavEl.tn2 {
    background-image: url(images/jun.png);
  }
  .tabNavEl.tn3 {
    background-image: url(images/mid.png);
  }
  .tabNavEl.tn4 {
    background-image: url(images/senior.png);
  }
  .tabNavEl.tn5 {
    background-image: url(images/expert.png);
    border-right: 1px solid var(--color-text-primary);
  }
  .tabEl {
    padding: 40px;
  }

  .tabEl li {
    margin-bottom: 16px;
  }

  .tabNavEl.active:after,
  .tabNavEl:hover:after {
    position: absolute;
    content: "";
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background-color: var(--color-primary);
  }

  .tabNavEl.tn1.active,
  .tabNavEl.tn1:hover {
    background-image: url(images/trainee.png);
  }
  .tabNavEl.tn2.active,
  .tabNavEl.tn2:hover {
    background-image: url(images/jun.png);
  }
  .tabNavEl.tn3.active,
  .tabNavEl.tn3:hover {
    background-image: url(images/mid.png);
  }
  .tabNavEl.tn4.active,
  .tabNavEl.tn4:hover {
    background-image: url(images/senior.png);
  }
  .tabNavEl.tn5.active,
  .tabNavEl.tn5:hover {
    background-image: url(images/expert.png);
  }
}

@media (min-width: 992px) {
  .tabs + .tabs {
    padding: 80px 0 0;
  }
  .tabNavEl {
    font-size: 23px;
  }
}
@media (min-width: 1280px) {
  .tabNav {
    max-width: 1280px;
  }
}

footer {
  padding: 40px 0 20px;
  background: var(--color-text-primary);
}

.footerTextContainer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 60px;
}

.footerLink {
  font: 400 14px/22px "Open Sans", sans-serif;
  color: var(--color-background);
}

.footerLink:hover,
.footerLink:focus {
  color: var(--color-primary);
}

.footerLink:active {
  color: var(--color-secondary);
}

.divider {
  content: "";
  width: 100%;
  border-bottom: 1px var(--color-grey1) solid;
  margin-bottom: 15px;
}
.rightsReservedText {
  font: 400 14px/22px "Open Sans", sans-serif;
  color: var(--color-grey2);  
  text-align: center;
}

@media (min-width: 360px) {
  footer {
    padding-top: 60px;
  }

  .footerTextContainer a:first-of-type {
    margin-bottom: 12px;
  }

  .rightsReservedText {
    font-size: 16px;
    text-align: left;
  }
}

@media (min-width: 768px) {
  .footerTextContainer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-bottom: 80px;
  }

  .footerLink,
  .rightsReservedText {
    font-size: 16px;
  }

  .footerTextContainer a:first-of-type {
    margin: 0;
  }
}

.language-selector {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
  border: 1px solid rgba(0, 0, 0, 0.1); /* Subtle border for visibility */
  padding: 5px 10px; /* Spacing inside the selector */
  border-radius: 5px; /* Rounded corners */
  font-size: 14px; /* Readable font size */
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px; /* Space between flag and text */    
}
.language-selector .flag-icon {
  width: 20px; /* Adjust size */
  height: auto; /* Maintain aspect ratio */
  display: inline-block;
  vertical-align: middle;
}
.language-selector a {
  color: #333; /* Dark text color */
  text-decoration: none; /* Remove underlines */
  margin: 0 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.language-selector a:hover {
  color: #007BFF; /* Accent color for hover state */
  text-decoration: underline; /* Highlight link on hover */    
}

/* Self-Evaluation Styles */
.assessment-intro {
  display: none;
  margin: 36px 0 0;
  gap: 18px;
}

body.assessment-mode .assessment-intro {
  display: grid;
}

.assessment-card,
.assessment-legend {
  border: 1px solid rgba(17, 36, 59, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
  box-shadow: 0 14px 30px rgba(17, 36, 59, 0.08);
}

.assessment-card {
  padding: 22px;
}

.assessment-card-copy {
  margin-bottom: 18px;
}

.assessment-eyebrow {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.assessment-card h2 {
  color: #10243b;
  font: 700 28px/34px "Open Sans", sans-serif;
}

.assessment-description {
  color: var(--color-text-secondary);
  font: 400 15px/23px "Open Sans", sans-serif;
  margin-top: 10px;
  max-width: 740px;
}

.assessment-card-grid {
  display: grid;
  gap: 14px;
}

.assessment-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #10243b;
  font-weight: 600;
}

.assessment-field input,
.assessment-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #c5ced8;
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-text-primary);
  font: 400 15px/22px "Open Sans", sans-serif;
}

.assessment-field input::placeholder {
  color: #8592a0;
}

.assessment-note {
  color: #5c6b7a;
  font: 400 12px/18px "Open Sans", sans-serif;
  margin-top: 14px;
}

.assessment-legend {
  padding: 18px 22px;
}

.assessment-legend-title {
  color: #10243b;
  font: 700 16px/20px "Open Sans", sans-serif;
  margin-bottom: 12px;
}

.assessment-legend-items {
  display: grid;
  gap: 10px;
}

.assessment-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-primary);
  font: 600 14px/20px "Open Sans", sans-serif;
}

.legend-assessment {
  display: flex;
  width: 42px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.legend-segment {
  width: 14px;
  height: 24px;
  background-color: #d1d5db;
}

.legend-segment + .legend-segment {
  border-left: 1px solid rgba(255, 255, 255, 0.8);
}

.legend-assessment[data-assessment="none"] .legend-segment-none {
  background-color: #ef4444;
}

.legend-assessment[data-assessment="partial"] .legend-segment-partial {
  background-color: #eab308;
}

.legend-assessment[data-assessment="mastered"] .legend-segment-mastered {
  background-color: var(--color-primary);
}

@media (min-width: 992px) {
  .assessment-intro {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: start;
  }

  .assessment-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.skill-row {
  display: flex;
  align-items: center; /* vertically center all flex children */
}

/* Bullet icon as inline flex child */
.bullet-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background: url("images/bullet.svg") no-repeat center center;
  background-size: contain;
}

/* skill-eval hidden by default; visible in assessment mode */
.skill-eval {
  display: none;
  margin-right: 10px;
  flex-shrink: 0;
}

body.assessment-mode .skill-eval {
  display: flex;
}

.skill-text {
  flex-grow: 1;
}

/* 3-State Toggle / Segmented Control */
.segmented-control {
  display: flex;
  background-color: var(--color-grey2);
  border-radius: 4px;
  overflow: hidden;
  height: 24px;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d1d5db;
  transition: background-color 0.2s;
}

.segmented-control label + input + label {
  border-left: 1px solid rgba(255, 255, 255, 0.8);
}

.segmented-control .label-none { width: 14px; }
.segmented-control .label-partial { width: 14px; }
.segmented-control .label-mastered { width: 14px; }

/* Inactive states / colors */
.segmented-control .label-none:hover { background-color: #fca5a5; }
.segmented-control .label-partial:hover { background-color: #fde047; }
.segmented-control .label-mastered:hover { background-color: #86efac; }

/* Active states */
.segmented-control input[value="none"]:checked + .label-none { background-color: #ef4444; }
.segmented-control input[value="partial"]:checked + .label-partial { background-color: #eab308; }
.segmented-control input[value="mastered"]:checked + .label-mastered { background-color: var(--color-primary); }

/* Report Actions */
.report-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.action-btn {
  background-color: var(--color-primary);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.2s;
  font-weight: 600;
}

.action-btn:hover {
  background-color: var(--color-secondary);
}

.assess-btn {
  background-color: #2563eb;
}

.assess-btn:hover {
  background-color: #1d4ed8;
}

body.assessment-mode .assess-btn {
  background-color: #dc2626;
}

body.assessment-mode .assess-btn:hover {
  background-color: #b91c1c;
}

#clear-progress {
  background-color: var(--color-text-secondary);
}
#clear-progress:hover {
  background-color: #333;
}

/* PDF Generation View Adjustments (Cloning 2.0) */
.pdf-export-container {
  padding: 20px;
  background: white;
  color: #1d1e1e;
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
}

.pdf-report-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 28px;
  padding: 0 0 20px;
  border-bottom: 2px solid #d7dce1;
}

.pdf-report-header-top {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.pdf-report-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.pdf-report-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.pdf-report-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.pdf-report-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  white-space: nowrap;
  color: #10243b;
}

.pdf-report-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.pdf-report-meta {
  border: 1px solid #d7dce1;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
}

.pdf-report-meta-title {
  color: #10243b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.pdf-report-meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.pdf-report-meta-label {
  color: #52606d;
  font-weight: 700;
}

.pdf-report-meta-value {
  color: #10243b;
  font-weight: 600;
}

.pdf-report-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.pdf-report-legend-label {
  color: #10243b;
  font-size: 14px;
  font-weight: 600;
}

.pdf-page {
  overflow: hidden;
  background: white;
}

.pdf-page-content {
  height: 100%;
}

.pdf-section-block {
  margin: 0 0 28px;
}

.pdf-header-block {
  margin-bottom: 32px;
}

.pdf-section-block:last-child {
  margin-bottom: 0;
}

.pdf-export-container .tabs {
  margin: 0 0 40px 0 !important;
  display: block !important;
  page-break-inside: avoid;
}

.pdf-export-container .tabNav {
  display: none !important;
}

.pdf-export-container .description {
  padding-bottom: 15px;
}

.pdf-export-container .description h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.pdf-export-container .description p {
  display: none; /* Hide descriptions to save space */
}

.pdf-export-container .tabHead {
  display: flex !important;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border: 1px solid #1d1e1e;
  font-weight: 700;
  margin-top: 5px;
}

.pdf-export-container .tabEl {
  display: block !important;
  padding: 15px 30px;
  border: 1px solid #1d1e1e;
  border-top: none;
  background: white !important;
}

.pdf-export-container .skill-row {
  margin-bottom: 8px;
  page-break-inside: avoid;
}

.pdf-export-container .skill-eval {
  display: flex !important; /* Force toggles to be visible in PDF */
}

.pdf-export-container .segmented-control {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.pdf-export-container .pdf-segment {
  width: 14px;
  height: 24px;
  background-color: #d1d5db;
}

.pdf-export-container .pdf-segment + .pdf-segment {
  border-left: 1px solid rgba(255, 255, 255, 0.8);
}

.pdf-export-container .segmented-control[data-assessment="none"] .pdf-segment-none {
  background-color: #ef4444;
}

.pdf-export-container .segmented-control[data-assessment="partial"] .pdf-segment-partial {
  background-color: #eab308;
}

.pdf-export-container .segmented-control[data-assessment="mastered"] .pdf-segment-mastered {
  background-color: var(--color-primary);
}

@media print {
  .language-selector, footer, header {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .language-selector {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .assessment-intro {
    margin-top: 96px;
  }
}
