/* ===== FONTS ===== */
/* Note: Gujarati Sangam MN is a system font on macOS. For cross-platform, consider a web font alternative */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* ===== CSS RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Gujarati Sangam MN', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  overflow: hidden;
}

/* ===== DESIGN SYSTEM COLORS ===== */
:root {
  --primary-green: #3bb550;
  --light-blue: #85bfd3;
  --blue-text: #5b9fb7;
  --light-blue-border: #b2e1f1;
  --progress-green: rgba(59, 181, 80, 0.3);
  --progress-green-solid: #b6dbbc;
  --gray-bg: #ebebeb;
  --gray-placeholder: #e8e8e8;
  --white: #ffffff;
  --black: #000000;
}

/* ===== MAIN LAYOUT ===== */
#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.screen {
  width: 100%;
  min-height: 100vh;
  position: relative;
  background: var(--white);
}

/* ===== HOME SCREEN ===== */
.home-left {
  width: 50%;
  background: var(--primary-green);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(20px, 5vw, 128px);
  padding-top: clamp(80px, 12vh, 140px);
  overflow: hidden;
}

.home-left h1 {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 50px);
  color: var(--white);
  margin-bottom: clamp(16px, 2.5vh, 40px);
  line-height: 1.2;
}

.home-left p {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.6vw, 24px);
  color: var(--white);
  max-width: 375px;
  margin-bottom: clamp(24px, 5vh, 60px);
  line-height: 1.4;
}

.home-left .btn-primary {
  width: clamp(200px, 25vw, 363px);
  height: clamp(52px, 5.5vh, 77px);
  background: var(--white);
  border-radius: 38.5px;
  border: none;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 25px);
  color: var(--primary-green);
  cursor: pointer;
  transition: transform 0.2s;
}

.home-left .btn-primary:hover {
  transform: scale(1.02);
}

.home-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.home-header {
  width: 100%;
  height: 60px;
  background: linear-gradient(to right, var(--primary-green) 0 50%, var(--light-blue) 50% 100%);
  display: flex;
  align-items: center;
  padding: 0 23px;
  gap: 14px;
  flex-shrink: 0;
  z-index: 10;
}

.home-profile-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  flex-shrink: 0;
  position: relative;
}

.home-profile-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='%235b9fb7' stroke-width='2'/%3E%3Cpath d='M4 20c0-3.6 3.2-6 8-6s8 2.4 8 6' fill='none' stroke='%235b9fb7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68%;
}

.home-signin-label {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  margin-left: auto;
  margin-right: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.home-signin-label:hover {
  text-decoration: underline;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.auth-modal {
  width: min(90vw, 520px);
  background: var(--white);
  border: 3px solid var(--light-blue-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.auth-title {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 10px;
}

.auth-copy {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 20px;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 16px;
  color: var(--blue-text);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  height: 56px;
  border-radius: 28px;
  border: 2px solid var(--light-blue);
  padding: 0 18px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 20px;
  color: var(--black);
  background: var(--white);
  margin-bottom: 18px;
}

.auth-input:focus {
  outline: none;
  border-color: var(--blue-text);
  box-shadow: 0 0 0 3px rgba(133, 191, 211, 0.25);
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.auth-btn {
  min-width: 122px;
  height: 52px;
  border-radius: 26px;
  border: 2px solid transparent;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-btn:hover {
  transform: scale(1.02);
}

.auth-btn-secondary {
  background: var(--white);
  border-color: var(--light-blue-border);
  color: var(--black);
}

.auth-btn-secondary:hover {
  background: rgba(178, 225, 241, 0.3);
}

.auth-btn-primary {
  background: var(--primary-green);
  color: var(--white);
}

.auth-btn-primary:hover {
  background: #34a348;
}

.auth-btn-danger {
  background: #e53232;
  color: var(--white);
}

.auth-btn-danger:hover {
  background: #cf2222;
}

.home-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.home-right {
  width: 50%;
  position: relative;
  background: var(--white);
  overflow: hidden;
}

.home-right .medical-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
}

/* ===== MODULE SCREENS ===== */
.module-screen {
  background: var(--white);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.module-screen-no-header .content-no-header {
  padding-top: 74px;
}

.header {
  width: 100%;
  height: 60px;
  background: var(--light-blue);
  display: flex;
  align-items: center;
  padding: 0 23px;
}

.profile-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  flex-shrink: 0;
  position: relative;
}

.profile-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='%235b9fb7' stroke-width='2'/%3E%3Cpath d='M4 20c0-3.6 3.2-6 8-6s8 2.4 8 6' fill='none' stroke='%235b9fb7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68%;
}

.progress-bar-container {
  position: absolute;
  left: 130px;
  top: clamp(74px, 9vh, 92px);
  width: calc(100% - 260px);
  height: 21px;
  background: var(--gray-bg);
  border-radius: 10.5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--progress-green-solid);
  border-radius: 10.5px;
  transition: width 0.3s ease;
}

.content {
  padding: 0 130px;
  padding-top: 120px;
  padding-bottom: 100px;
  max-width: 1512px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--blue-text);
  margin-bottom: 12px;
}

.main-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--black);
  margin-bottom: 20px;
  max-width: 621px;
  line-height: 1.2;
}

.description-text {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--black);
  line-height: 1.5;
  max-width: 488px;
}

.overview-list {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--black);
  margin-left: 33px;
  margin-top: 40px;
  line-height: 1.6;
}

.overview-list li {
  margin-bottom: 12px;
}

.step-image-wrap {
  width: 100%;
  max-width: 618px;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

/* Figma-matched crop for images that are positioned within the frame */
.step-image-wrap--figma-crop {
  display: block;
  position: relative;
}

.step-image-wrap--figma-crop .step-image {
  position: absolute;
  object-fit: fill;
  border-radius: 0;
  max-width: none;
}

.step-image-wrap--crop-step2 .step-image {
  width: 467.58%;
  height: 113.72%;
  left: -89.02%;
  top: -13.79%;
}

.step-image-wrap--crop-step5 .step-image {
  width: 152.71%;
  height: 99.99%;
  left: -26.39%;
  top: 0.09%;
}

.step-image-wrap--crop-step9 .step-image {
  width: 445.25%;
  height: 145.17%;
  left: -350.14%;
  top: -33.17%;
}

.step-image-wrap--crop-icon .step-image {
  width: 164.8%;
  height: 95.22%;
  left: -80.63%;
  top: 2.58%;
}

.button-container {
  position: fixed;
  bottom: 40px;
  right: 130px;
  display: flex;
  gap: 20px;
  z-index: 100;
}

.btn {
  height: 73px;
  border-radius: 36.336px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--black);
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.btn:hover {
  transform: scale(1.02);
  background: rgba(133, 191, 211, 0.12);
}

.btn-outline {
  width: 269px;
  border: 3.84px solid var(--light-blue);
}

.btn-outline:hover {
  background: rgba(133, 191, 211, 0.2);
}

.btn-outline-secondary {
  width: 162px;
  border: 3.84px solid var(--light-blue-border);
}

.btn-outline-secondary:hover {
  background: rgba(178, 225, 241, 0.3);
}

.btn-back {
  width: 162px;
  border: 3.84px solid var(--light-blue-border);
}

.btn-back:hover {
  background: rgba(178, 225, 241, 0.3);
}

.btn-next {
  width: 162px;
  border: 3.84px solid var(--light-blue);
}

.btn-next:hover {
  background: rgba(133, 191, 211, 0.22);
}

/* Give extra room only to nav buttons with longer labels (e.g., "Check Answer") */
.btn.btn-wide-text {
  width: 220px;
}

/* ===== TWO COLUMN LAYOUT (for step screens) ===== */
.two-column-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.left-column {
  flex: 1;
  max-width: 488px;
}

.right-column {
  flex: 1;
  max-width: 618px;
}

/* ===== QUIZ SCREEN ===== */
.quiz-instructions {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--black);
  margin-bottom: 30px;
  line-height: 1.5;
}

.quiz-item {
  width: 100%;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  text-align: left;
  line-height: 1.4;
}

.quiz-item:hover {
  border-color: var(--light-blue);
  background: rgba(133, 191, 211, 0.05);
}

.quiz-item .add-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: #ccc;
  margin-top: 2px;
}

.quiz-item:hover .add-icon {
  border-color: var(--light-blue);
  color: var(--light-blue);
}

.quiz-item.selected {
  border-color: var(--primary-green);
  background: rgba(59, 181, 80, 0.05);
}

.quiz-item.selected .add-icon {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: var(--white);
}

.sequence-list {
  margin-top: 30px;
  margin-bottom: 30px;
}

.sequence-item {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 16px;
  color: var(--black);
}

.sequence-number {
  font-weight: 700;
  min-width: 25px;
}

.sequence-line {
  flex: 1;
  border-bottom: 1px solid #d0d0d0;
  margin-top: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
  .home-left, .home-right {
    width: 50%;
  }
  
  .home-left {
    padding-left: 80px;
  }
  
  .content {
    padding-left: 80px;
    padding-right: 80px;
  }
  
  .progress-bar-container {
    left: 80px;
    width: calc(100% - 160px);
  }
  
  .placeholder-image {
    right: 80px;
    width: 500px;
    height: 320px;
  }
  
  .button-container {
    right: 80px;
  }
}

@media (max-width: 1024px) {
  .home-screen {
    flex-direction: column;
  }
  
  .home-left, .home-right {
    width: 100%;
  }
  
  .home-left {
    min-height: 60vh;
    padding-left: 40px;
  }
  
  .home-right {
    min-height: 40vh;
  }
  
  .home-right .medical-image {
    height: 100%;
  }
  
  .content {
    padding: 110px 40px 100px;
  }
  
  .progress-bar-container {
    left: 40px;
    width: calc(100% - 80px);
  }
  
  .placeholder-image {
    position: relative;
    right: auto;
    top: auto;
    margin-top: 40px;
    width: 100%;
    height: 300px;
  }
  
  .button-container {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 40px;
    justify-content: flex-end;
  }
  
  .two-column-layout {
    flex-direction: column;
  }
  
  .left-column, .right-column {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .home-left h1 {
    font-size: 36px;
  }
  
  .home-left p {
    font-size: 20px;
  }
  
  .home-left .btn-primary {
    width: 100%;
    max-width: 363px;
  }
  
  .main-heading {
    font-size: 32px;
  }
  
  .section-label,
  .description-text {
    font-size: 18px;
  }
  
  .button-container {
    flex-direction: column-reverse;
  }
  
  .btn-outline,
  .btn-back,
  .btn-next,
  .btn-outline-secondary {
    width: 100%;
  }
}

/* ===== DRAG AND DROP STYLES ===== */
.draggable-item {
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  cursor: move;
  transition: all 0.2s;
  line-height: 1.4;
  user-select: none;
}

.draggable-item:hover {
  border-color: var(--light-blue);
  background: rgba(133, 191, 211, 0.05);
}

.draggable-item.dragging {
  opacity: 0.5;
}

.draggable-item.drag-over {
  border-color: var(--primary-green);
  border-style: dashed;
}

/* ===== COMPLETION SCREENS ===== */
.completion-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 121px);
  padding: 60px 130px;
  text-align: center;
}

.completion-icon {
  font-size: 120px;
  margin-bottom: 40px;
}

.completion-title {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: clamp(38px, 5.5vw, 80px);
  color: var(--black);
  margin-top: 32px;
  margin-bottom: 24px;
  line-height: 1.1;
}

.completion-message {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 22px;
  color: var(--black);
  max-width: 600px;
  line-height: 1.5;
  margin: 0;
}

.completion-message-box {
  max-width: 700px;
  width: 100%;
  padding: 30px 48px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.completion-message-pass {
  background: #e4ffe3;
}

.completion-message-fail {
  background: #ffebeb;
}

.completion-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Score circle */
.score-circle {
  width: 242px;
  height: 242px;
  position: relative;
  flex-shrink: 0;
}

.score-circle-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.score-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 1;
}

.score-text-green {
  color: #07c800;
}

.score-text-red {
  color: #e53232;
}

.score-circle-pass {
  border: 6px solid var(--primary-green);
  border-radius: 50%;
}

.score-circle-fail {
  border: 6px solid #e53232;
  border-radius: 50%;
}

/* Fail READ ME box */
.fail-read-me {
  background: #fff6cd;
  border-radius: 41px;
  padding: 30px 36px;
  max-width: 580px;
  width: 100%;
  margin-bottom: 32px;
  text-align: left;
}

.fail-read-me-title {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #ffa100;
  margin-bottom: 12px;
}

.fail-read-me-body,
.fail-read-me-footer {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 20px;
  color: #ffa100;
  line-height: 1.5;
}

/* ===== MINI QUIZ (MATCHING) ===== */
.mq-content {
  padding-top: clamp(100px, 14vh, 160px);   /* ADD this line */
  padding-bottom: clamp(60px, 7vh, 90px);
}

.mq-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--black);
  margin-bottom: clamp(12px, 2vh, 28px);   /* was clamp(12px, 4vh, 60px) */
}

.mq-area {
  display: grid;
  grid-template-columns: 162px 5fr 7fr;
  grid-auto-rows: auto;
  align-items: center;
  row-gap: clamp(6px, 1.3vh, 16px);
  width: 100%;
}

/* Labels → col 1 */
.mq-area .mq-label {
  grid-column: 1;
  align-self: center;
}

/* SVG → col 2, spans all pair rows */
.mq-area .mq-svg {
  grid-column: 2;
  grid-row: 1 / span 3;
  position: static;
  width: 100%;
  height: 100%;
  align-self: stretch;
  overflow: visible;
  pointer-events: none;
}

/* Def boxes → col 3 */
.mq-area .mq-def {
  grid-column: 3;
  align-self: center;
}

.mq-label {
  width: 162px;
  height: 73px;
  border: 2px solid var(--black);
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 20px;
  color: var(--black);
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
}

.mq-label:hover {
  border-color: var(--light-blue);
  color: var(--blue-text);
}

.mq-label-selected {
  border-color: var(--black) !important;
  color: var(--black) !important;
  background: rgba(0, 0, 0, 0.06);
  cursor: grabbing;
}

.mq-label-matched {
  border-color: #aaa;
  color: #aaa;
}

.mq-label-result {
  cursor: default;
}

.mq-def {
  border: 2px solid var(--light-blue);
  border-radius: 33px;
  padding: clamp(12px, 1.8vh, 20px) 24px;
  padding-right: 72px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 16px;
  color: var(--black);
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.mq-def:hover {
  border-color: var(--blue-text);
  background: rgba(133, 191, 211, 0.07);
}

.mq-def-matched {
  border-color: var(--black);
  background: rgba(0, 0, 0, 0.04);
}

/* Result states */
.mq-def-result {
  cursor: default;
  flex: 1;
  min-width: 0;
  position: relative;
}

.mq-def-result .mq-result-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
}

/* Row wrapper: def box + icon outside */
.mq-def-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mq-def-correct {
  border-color: var(--primary-green);
  background: rgba(59, 181, 80, 0.07);
}

.mq-def-incorrect {
  border-color: #e53232;
  background: rgba(229, 50, 50, 0.05);
}

.mq-result-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  position: relative;
}

.mq-result-icon.mq-icon-correct {
  background: var(--primary-green);
  color: var(--white);
}

.mq-result-icon.mq-icon-incorrect {
  background: #e53232;
  color: var(--white);
}

/* Two-column footer — replaced by grid; keep rule names for safety */
.mq-footer-row    { display: none; }
.mq-footer-labels { display: none; }
.mq-footer-svg    { display: none; }
.mq-footer-defs   { display: none; }

/* Feedback row */
.mq-feedback {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(12px, 2.5vh, 36px);
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.mq-feedback-correct {
  color: var(--primary-green);
}

.mq-feedback-incorrect {
  color: #e53232;
}

.mq-feedback-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.mq-icon-correct {
  background: var(--primary-green);
  color: var(--white);
}

.mq-icon-incorrect {
  background: #e53232;
  color: var(--white);
}

/* READ ME box */
.mq-read-me {
  background: #fff6cd;
  border-radius: 20px;
  padding: 24px 30px;
  max-width: 500px;
  margin-top: clamp(8px, 1.5vh, 20px);
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 18px;
  color: #ffa100;
  line-height: 1.5;
}

.mq-read-me-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.mq-read-me p + p {
  margin-top: 10px;
}

/* Disabled check-answer button */
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-disabled:hover {
  transform: none;
}

/* ===== RESULT SCREEN GRID LAYOUT ===== */

/*
  4-column grid: [labels] [svg-lines] [def-boxes] [icons]
  Row 1-3: the matching pairs
  Row 4:   footer (READ ME left, feedback right)
  This ensures the footer columns align perfectly with the content above.
*/
.mq-result-grid {
  display: grid;
  grid-template-columns: 162px 5fr 7fr 48px;
  grid-auto-rows: auto;
  align-items: center;
  row-gap: clamp(6px, 1.3vh, 16px);
}

/* Labels → col 1 — same size as pre-submission labels */
.mq-result-grid .mq-label {
  grid-column: 1;
  height: 73px;
  font-size: 20px;
  cursor: default;
  align-self: center;
}

/* SVG → col 2, spans all 3 pair rows (explicit via inline style on element) */
.mq-result-grid .mq-svg {
  grid-column: 2;
  grid-row: 1 / span 3;
  position: static;
  width: 100%;
  height: 100%;
  align-self: stretch;
}

/* Def boxes → col 3 — same size as pre-submission def boxes */
.mq-result-grid .mq-def {
  grid-column: 3;
  font-size: 16px;
  padding: clamp(12px, 1.8vh, 20px) 24px;
  cursor: default;
  align-self: center;
}

/* Icons → col 4 */
.mq-result-grid .mq-result-icon {
  grid-column: 4;
  justify-self: center;
  align-self: center;
  width: 34px;
  height: 34px;
}

/* Footer — sits BELOW the result grid in a matching column layout */
.mq-footer {
  display: grid;
  grid-template-columns: 162px 5fr 7fr 48px;
  margin-top: 8px;
  align-items: start;
}

.mq-footer-left {
  grid-column: 1 / 3;
  align-self: start;
  max-width: 460px;
}

.mq-footer-right {
  grid-column: 3 / 5;
  display: flex;
  align-items: flex-start;
  align-self: start;
  justify-self: start;
  padding-top: 10px;
}

.mq-footer-correct {
  grid-column: 1 / 5;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary-green);
}

/* Keep result screen on the same matching-board layout and add feedback below */
.mq-area-result .mq-label,
.mq-area-result .mq-def {
  cursor: default;
}

.mq-result-feedback-single {
  margin-top: 0;
}

.mq-result-feedback-wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 0;
}

.mq-result-feedback-wrap .mq-read-me {
  margin-top: 0;
  flex: 1;
  max-width: 500px;
}

.mq-result-feedback-wrap .mq-feedback {
  margin-top: 0;
  flex: 1;
}

/* ===== RESULT SCREEN OVERRIDES ===== */

.mq-feedback-slot {
  min-height: 176px;
  margin-top: clamp(12px, 2.2vh, 28px);
}

.mq-feedback-slot .mq-read-me {
  padding: 16px 22px;
  font-size: 16px;
  line-height: 1.4;
  border-radius: 16px;
  margin-top: 0;
  max-width: none;
}

.mq-feedback-slot .mq-read-me-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.mq-feedback-slot .mq-feedback {
  font-size: 20px;
  font-weight: 700;
  gap: 12px;
  margin-top: 0;
  width: 100%;
  max-width: 520px;
}

.mq-result-grid .mq-result-icon::before,
.mq-result-grid .mq-result-icon::after,
.mq-def-result .mq-result-icon::before,
.mq-def-result .mq-result-icon::after,
.mq-feedback-slot .mq-feedback-icon::before,
.mq-feedback-slot .mq-feedback-icon::after {
  content: '';
  position: absolute;
  background: var(--white);
  border-radius: 999px;
}

.mq-result-grid .mq-icon-correct::before,
.mq-def-result .mq-icon-correct::before,
.mq-feedback-slot .mq-feedback-icon.mq-icon-correct::before {
  width: 7px;
  height: 15px;
  border-right: 4px solid var(--white);
  border-bottom: 4px solid var(--white);
  background: transparent;
  border-radius: 0;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.mq-result-grid .mq-icon-correct::after,
.mq-def-result .mq-icon-correct::after,
.mq-feedback-slot .mq-feedback-icon.mq-icon-correct::after {
  display: none;
}

.mq-result-grid .mq-icon-incorrect::before,
.mq-def-result .mq-icon-incorrect::before,
.mq-feedback-slot .mq-feedback-icon.mq-icon-incorrect::before {
  width: 4px;
  height: 18px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.mq-result-grid .mq-icon-incorrect::after,
.mq-def-result .mq-icon-incorrect::after,
.mq-feedback-slot .mq-feedback-icon.mq-icon-incorrect::after {
  width: 4px;
  height: 18px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ===== CONTENT INFO SCREENS (Common Mistakes / Critical Fail) ===== */
.content-info .info-list {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--black);
  margin-left: 24px;
  margin-top: 20px;
  line-height: 1.7;
}

.content-info .info-list li {
  margin-bottom: 18px;
}

/* Keep definition text roomy and use a consistent Figma-like status icon */
.content-info .left-column {
  max-width: 620px;
}

.content-info .right-column {
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-icon {
  position: relative;
  flex-shrink: 0;
}

.status-icon--x {
  width: 320px;
  height: 320px;
  border: 22px solid #f91524;
  border-radius: 50%;
}

.status-icon--x::before,
.status-icon--x::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 185px;
  height: 36px;
  background: #f91524;
  border-radius: 20px;
  transform-origin: center;
}

.status-icon--x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.status-icon--x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ===== VIDEO SCREEN ===== */
.video-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 102px;
  padding-bottom: 190px;
}

.video-instruction {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--black);
  margin-bottom: clamp(12px, 2.5vh, 32px);
}

.video-player-shell {
  width: 100%;
  max-width: 900px;
  height: clamp(220px, calc(100vh - 430px), 470px);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.training-video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
  background: #000;
}

/* ===== VIDEO QUIZ SCREEN ===== */
.vq-content {
  padding-bottom: clamp(60px, 8vh, 120px);
}

.vq-instruction {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--black);
  margin-bottom: clamp(16px, 3vh, 40px);
  max-width: 760px;
  line-height: 1.5;
}

.vq-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: clamp(12px, 2vh, 28px);
}

.vq-num {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--black);
  min-width: 24px;
}

.vq-select {
  flex: 1;
  max-width: 580px;
  height: 58px;
  border: 2px solid var(--light-blue);
  border-radius: 29px;
  padding: 0 24px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 18px;
  color: var(--black);
  background: var(--white);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' stroke='%235b9fb7' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
}

.vq-select:focus {
  outline: none;
  border-color: var(--blue-text);
}

/* ===== VIDEO QUIZ RESULT SCREEN ===== */
.vq-result-content {
  padding-bottom: clamp(140px, 20vh, 240px);
}

.vq-result-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 52px);
  margin-bottom: 8px;
}

.vq-result-left {
  flex: 1;
  min-width: 0;
  max-width: 660px;
}

.vq-result-right {
  width: min(100%, 390px);
  flex-shrink: 0;
  align-self: flex-start;
}

.vq-result-item {
  display: grid;
  grid-template-columns: 34px minmax(280px, 1fr) 40px;
  align-items: center;
  column-gap: 16px;
  margin-bottom: clamp(12px, 1.8vh, 24px);
}

.vq-result-select {
  height: 58px;
  border-radius: 29px;
  border: 2px solid var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.vq-result-select-label {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 18px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.vq-result-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
}

.vq-result-select-correct {
  background: rgba(59, 181, 80, 0.12);
  border-color: var(--primary-green);
}

.vq-result-select-incorrect {
  background: rgba(229, 50, 50, 0.08);
  border-color: #e53232;
}

.vq-result-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vq-result-icon-correct {
  background: var(--primary-green);
}

.vq-result-icon-correct::before {
  content: '';
  width: 7px;
  height: 14px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}

.vq-result-icon-incorrect {
  background: #e53232;
}

.vq-result-icon-incorrect::before,
.vq-result-icon-incorrect::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: #fff;
}

.vq-result-icon-incorrect::before {
  transform: rotate(45deg);
}

.vq-result-icon-incorrect::after {
  transform: rotate(-45deg);
}

.vq-read-me {
  margin-top: 0;
  border-radius: 30px;
  background: #fff6cd;
  color: #ffa100;
  padding: 24px 24px;
}

.vq-read-me .mq-read-me-title {
  color: #ffa100;
}

.vq-read-me p {
  color: #ffa100;
}

.vq-result-feedback {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
}

.vq-result-feedback-correct {
  color: var(--primary-green);
}

.vq-result-feedback-correct span:last-child {
  white-space: nowrap;
}

.vq-result-feedback-incorrect {
  color: #e53232;
}

.vq-result-bottom-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 1100px) {
  .vq-result-main {
    flex-direction: column;
  }

  .vq-result-right {
    width: 100%;
    max-width: 560px;
  }

  .vq-result-item {
    grid-template-columns: 34px minmax(220px, 1fr) 40px;
  }
}

/* ===== TRUE/FALSE SCREEN ===== */
.tf-content {
  padding-bottom: clamp(60px, 8vh, 120px);
}

.tf-instruction {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--black);
  margin-bottom: clamp(12px, 2.5vh, 32px);
}

.tf-card {
  background: var(--white);
  border: 2px solid var(--light-blue-border);
  border-radius: 24px;
  padding: clamp(20px, 3vh, 40px) 48px;
  max-width: 760px;
}

.tf-statement {
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 22px;
  color: var(--black);
  line-height: 1.5;
  margin-bottom: clamp(16px, 2.5vh, 36px);
}

.tf-buttons {
  display: flex;
  gap: 28px;
}

.tf-btn {
  width: 160px;
  height: 60px;
  border: 3px solid var(--light-blue);
  border-radius: 30px;
  font-family: 'Gujarati Sangam MN', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.tf-btn:hover {
  border-color: var(--blue-text);
  background: rgba(133, 191, 211, 0.1);
}

.tf-selected {
  border-color: var(--blue-text) !important;
  background: var(--blue-text) !important;
  color: var(--white) !important;
  box-shadow: 0 0 0 4px rgba(91, 159, 183, 0.24);
}

.tf-btn.tf-selected:hover {
  border-color: var(--blue-text) !important;
  background: var(--blue-text) !important;
  color: var(--white) !important;
}

.tf-correct {
  border-color: var(--primary-green) !important;
  background: rgba(59, 181, 80, 0.1) !important;
  color: var(--primary-green) !important;
}

.tf-incorrect {
  border-color: #e53232 !important;
  background: rgba(229, 50, 50, 0.05) !important;
  color: #e53232 !important;
}
/* Overview "Begin Training" button — left-aligned */
.button-container-left {
  right: auto;
  left: 130px;
}

/* Final quiz / fail — allow scrolling */
.module-screen--scrollable {
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}

/* On scrollable screens, buttons flow with content instead of fixed to viewport */
.module-screen--scrollable .button-container {
  position: relative;
  bottom: auto;
  right: auto;
  padding: 32px 130px 48px;
  justify-content: flex-end;
}


/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
