/* app/globals.css */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;900&display=swap");
@import "tailwindcss";

/* ────────────────────────────────────────────────────────────────
   RSColor System from Flutter - All Colors Defined Here
   ──────────────────────────────────────────────────────────────── */





   /* =========================================
   ROOT
========================================= */

/* html {
  scrollbar-width: none;
  -ms-overflow-style: none;
} */

/* html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
} */

/* =========================================
   BODY
========================================= */

/* body {
  margin: 0;
  padding: 0;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
} */

/* =========================================
   ALL ELEMENTS
========================================= */
/*
* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
} */

/* *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
} */







:root {
  /* ── Primary Colors (TlMate Plum / Purple from RSColor) ── */
  --rs-primary: #A2629B;
  --rs-primary-soft: #BF73B7;
  --rs-ocean-blue: #066199;
  --rs-dark: #5E3859;
  --rs-medium: #8E5487;
  --rs-light: #F8E9F7;
  --rs-primary-extra-soft: #EFF3FC;

  /* ── CBO Colors ── */
  --rs-cbo-primary-dark: #00386A;
  --rs-cbo-primary-light: #F4A4EE;
  --rs-cbo-primary: #D880D0;

  /* ── Secondary Colors ── */
  --rs-secondary-soft: #9D9D9D;
  --rs-secondary-extra-soft: #E9E9E9;

  /* ── Status Colors ── */
  --rs-error: #D00E0E;
  --rs-success: #16AE26;
  --rs-warning: #EB8600;

  /* ── CBT Colors ── */
  --rs-cbt-primary: #A2629B;
  --rs-cbt-grey: #ABA8A8;
  --rs-cbt-black: #000000;
  --rs-cbt-blue: #066199;

  /* ── Font & White ── */
  --rs-font: #003D67;
  --rs-white: #FFFFFF;

  /* ── Material Primary Swatch (RSColor Plum/Mauve Scale) ── */
  --rs-material-10: #F8E9F7;
  --rs-material-50: #F6C9F3;
  --rs-material-100: #F4A4EE;
  --rs-material-200: #D880D0;
  --rs-material-300: #CD79C5;
  --rs-material-400: #BF73B7;
  --rs-material-500: #A866A1;
  --rs-material-600: #A2629B;
  --rs-material-700: #8E5487;
  --rs-material-800: #7A4974;
  --rs-material-900: #5E3859;

  /* ── Gradients ── */
  --rs-grad-start: #A2629B;
  --rs-grad-end: #8E5487;
  --rs-grad-1: #00FFE2;
  --rs-grad-2: #FFFFFF;
  --rs-grad-3: #00386A;
  --rs-grad-4: #5E3859;
  --rs-grad-5: #D880D0;
  --rs-grad-6: #A2629B;
}

/* ── Base Styles ── */
* {
  box-sizing: border-box;

}

body {
  margin: 0;
  background: var(--rs-primary-extra-soft);
  font-family: "Nunito", sans-serif;
  color: var(--rs-font);
}

@media (min-width: 768px) {
  body {
    overflow-x: hidden;
  }
}

/* ── Animations ── */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── Cards ── */
.sticker-card {
  background: var(--rs-white);
  border-radius: 40px;
  border: 6px solid var(--rs-white);
  box-shadow: 0 20px 40px rgba(162, 98, 155, 0.14);
  transition: transform 0.3s, box-shadow 0.3s;
}

.sticker-card:hover {
  box-shadow: 0 25px 50px rgba(162, 98, 155, 0.24);
}

::-webkit-scrollbar-thumb {
  background: var(--rs-material-100);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rs-primary);
}

/* ── Buttons ── */
.bouncy-btn {
  font-weight: 900;
  border: 4px solid var(--rs-white);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  outline: none;
}

.bouncy-btn:hover:not(:disabled) {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.bouncy-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.bouncy-btn:disabled {
  opacity: 0.6;
  filter: grayscale(1);
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Inputs ── */
.chunky-input {
  width: 100%;
  padding: 15px 20px;
  border-radius: 20px;
  border: 4px solid transparent;
  background: var(--rs-primary-extra-soft);
  font-weight: 800;
  color: var(--rs-font);
  transition: all 0.3s;
  outline: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  font-family: "Nunito", sans-serif;
}

.chunky-input:focus {
  border-color: var(--rs-cbt-primary);
  transform: scale(1.02);
  background: var(--rs-white);
  box-shadow: 0 10px 25px rgba(162, 98, 155, 0.16);
}

.chunky-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}


/* ── Header ── */
.topbar-desktop-margin {
  margin-left: -16px;
  margin-right: -16px;
  margin-top: -16px;
  width: calc(100% + 32px);
}

@media (min-width: 768px) {
  .topbar-desktop-margin {
    margin-left: -32px;
    margin-right: -32px;
    margin-top: -32px;
    width: calc(100% + 64px);
  }
}

.rs-header-gradient {
  background: linear-gradient(180deg, var(--rs-grad-start), var(--rs-grad-end));
}

/* ── Gradients from Flutter ── */
.rs-primary-gradient {
  background: linear-gradient(180deg, var(--rs-grad-start), var(--rs-grad-end));
}

.rs-primary-gradient-1 {
  background: linear-gradient(180deg, var(--rs-grad-1), var(--rs-grad-2));
}

.rs-secondary-gradient {
  background: linear-gradient(180deg, var(--rs-grad-2), var(--rs-grad-2));
}

.rs-secondary-gradient-lr {
  background: linear-gradient(90deg, var(--rs-grad-3), var(--rs-grad-4));
}

.rs-accent-gradient {
  background: linear-gradient(90deg, var(--rs-grad-5), var(--rs-grad-6));
}

/* ── Badges/Pills ── */
.rs-accent-pill {
  background: var(--rs-material-10);
  color: var(--rs-cbt-primary);
  border: 2px solid var(--rs-white);
  border-radius: 999px;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 10px;
}

/* ── TEXT COLOR UTILITIES ── */
.text-rs-primary { color: var(--rs-primary); }
.text-rs-primary-soft { color: var(--rs-primary-soft); }
.text-rs-dark { color: var(--rs-dark); }
.text-rs-medium { color: var(--rs-medium); }
.text-rs-light { color: var(--rs-light); }
.text-rs-primary-extra-soft { color: var(--rs-primary-extra-soft); }
.text-rs-cbo-primary-dark { color: var(--rs-cbo-primary-dark); }
.text-rs-cbo-primary-light { color: var(--rs-cbo-primary-light); }
.text-rs-cbo-primary { color: var(--rs-cbo-primary); }
.text-rs-secondary-soft { color: var(--rs-secondary-soft); }
.text-rs-secondary-extra-soft { color: var(--rs-secondary-extra-soft); }
.text-rs-error { color: var(--rs-error); }
.text-rs-success { color: var(--rs-success); }
.text-rs-warning { color: var(--rs-warning); }
.text-rs-white { color: var(--rs-white); }
.text-rs-font { color: var(--rs-font); }
.text-rs-cbt-primary { color: var(--rs-cbt-primary); }
.text-rs-cbt-grey { color: var(--rs-cbt-grey); }
.text-rs-cbt-black { color: var(--rs-cbt-black); }
.text-rs-cbt-blue { color: var(--rs-cbt-blue); }

/* ── BACKGROUND COLOR UTILITIES ── */
.bg-rs-primary { background-color: var(--rs-primary); }
.bg-rs-primary-soft { background-color: var(--rs-primary-soft); }
.bg-rs-dark { background-color: var(--rs-dark); }
.bg-rs-medium { background-color: var(--rs-medium); }
.bg-rs-light { background-color: var(--rs-light); }
.bg-rs-primary-extra-soft { background-color: var(--rs-primary-extra-soft); }
.bg-rs-cbo-primary-dark { background-color: var(--rs-cbo-primary-dark); }
.bg-rs-cbo-primary-light { background-color: var(--rs-cbo-primary-light); }
.bg-rs-cbo-primary { background-color: var(--rs-cbo-primary); }
.bg-rs-secondary-soft { background-color: var(--rs-secondary-soft); }
.bg-rs-secondary-extra-soft { background-color: var(--rs-secondary-extra-soft); }
.bg-rs-error { background-color: var(--rs-error); }
.bg-rs-success { background-color: var(--rs-success); }
.bg-rs-warning { background-color: var(--rs-warning); }
.bg-rs-white { background-color: var(--rs-white); }
.bg-rs-font { background-color: var(--rs-font); }
.bg-rs-cbt-primary { background-color: var(--rs-cbt-primary); }
.bg-rs-cbt-grey { background-color: var(--rs-cbt-grey); }
.bg-rs-cbt-black { background-color: var(--rs-cbt-black); }
.bg-rs-cbt-blue { background-color: var(--rs-cbt-blue); }

/* ── BORDER COLOR UTILITIES ── */
.border-rs-primary { border-color: var(--rs-primary); }
.border-rs-primary-soft { border-color: var(--rs-primary-soft); }
.border-rs-dark { border-color: var(--rs-dark); }
.border-rs-medium { border-color: var(--rs-medium); }
.border-rs-light { border-color: var(--rs-light); }
.border-rs-error { border-color: var(--rs-error); }
.border-rs-success { border-color: var(--rs-success); }
.border-rs-warning { border-color: var(--rs-warning); }
.border-rs-cbt-primary { border-color: var(--rs-cbt-primary); }
.border-rs-cbt-blue { border-color: var(--rs-cbt-blue); }

/* ── RING/ACCENT UTILITIES ── */
.accent-rs-primary { accent-color: var(--rs-primary); }
.accent-rs-cbt-primary { accent-color: var(--rs-cbt-primary); }
.accent-rs-success { accent-color: var(--rs-success); }

/* ── MATERIAL COLOR UTILITIES ── */
.text-rs-material-50 { color: var(--rs-material-50); }
.text-rs-material-100 { color: var(--rs-material-100); }
.text-rs-material-200 { color: var(--rs-material-200); }
.text-rs-material-300 { color: var(--rs-material-300); }
.text-rs-material-400 { color: var(--rs-material-400); }
.text-rs-material-500 { color: var(--rs-material-500); }
.text-rs-material-600 { color: var(--rs-material-600); }
.text-rs-material-700 { color: var(--rs-material-700); }
.text-rs-material-800 { color: var(--rs-material-800); }
.text-rs-material-900 { color: var(--rs-material-900); }

.bg-rs-material-50 { background-color: var(--rs-material-50); }
.bg-rs-material-100 { background-color: var(--rs-material-100); }
.bg-rs-material-200 { background-color: var(--rs-material-200); }
.bg-rs-material-300 { background-color: var(--rs-material-300); }
.bg-rs-material-400 { background-color: var(--rs-material-400); }
.bg-rs-material-500 { background-color: var(--rs-material-500); }
.bg-rs-material-600 { background-color: var(--rs-material-600); }
.bg-rs-material-700 { background-color: var(--rs-material-700); }
.bg-rs-material-800 { background-color: var(--rs-material-800); }
.bg-rs-material-900 { background-color: var(--rs-material-900); }

/* ── PRINT STYLES ── */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 4mm 4mm 10mm;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    color: black !important;
    font-family: 'Nunito', Times, serif !important;
    font-size: 12.5pt !important;
    line-height: 1.55 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  .min-h-screen {
    min-height: unset !important;
    background: white !important;
    padding: 0 !important;
  }

  .no-print,
  header,
  [class*="sticky"][class*="top-0"],
  [class*="print\\:hidden"],
  [class*="print:hidden"] {
    display: none !important;
  }

  body > div, #__next, #__next > div {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
    min-height: unset !important;
    max-width: 100% !important;
  }

  #paper-content-wrapper {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: white !important;
    margin: 0 !important;
  }

  #paper-content-wrapper > div:first-child {
    display: none !important;
  }

  #paper-content {
    background: white !important;
    color: black !important;
    font-family: 'Nunito', Times, serif !important;
    font-size: 12.5pt !important;
    line-height: 1.6 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .print-content-area {
    margin-top: 4mm !important;
    margin-bottom: 0 !important;
  }

  .print-header {
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
  }

  .print-header h1 {
    font-size: 16pt !important;
    font-weight: 900 !important;
    margin: 0 0 2px !important;
    color: black !important;
  }

  .print-header h2 {
    font-size: 13pt !important;
    font-weight: 700 !important;
    margin: 0 0 6px !important;
    color: #333 !important;
  }

  .print-header table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11pt !important;
    font-weight: 600 !important;
    color: black !important;
  }

  .print-header table td {
    padding: 1px 0 !important;
    line-height: 1.2 !important;
    vertical-align: top !important;
  }

  .section-block {
    margin-bottom: 12px !important;
  }

  .question-block {
    margin-bottom: 6px !important;
  }

  .section-block h3 {
    font-size: 8pt !important;
    font-weight: 900 !important;
    margin: 10px 0 6px !important;
    padding: 4px 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: black !important;
  }

  .question-block {
    break-inside: auto !important;
    page-break-inside: avoid !important;
    margin-bottom: 4px !important;
    padding-bottom: 2px !important;
  }

  .question-block table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11pt !important;
    color: black !important;
  }

  .question-block table td {
    padding: 1px 2px !important;
    vertical-align: top !important;
  }

  .question-block td:first-child {
    width: 30px !important;
    font-weight: bold !important;
  }

  .question-block td:last-child {
    width: 40px !important;
    text-align: right !important;
    font-weight: bold !important;
  }

  #paper-content img {
    max-width: 30% !important;
    max-height: 200px !important;
    height: auto !important;
    width: auto !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 4pt 0 !important;
    display: block !important;
  }

  .options-print {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    margin-top: 4pt !important;
    margin-left: 20px !important;
  }

  .options-print div {
    margin-bottom: 2pt !important;
  }

  .answer-box-print {
    margin-top: 4pt !important;
    padding: 4pt 6pt !important;
    background: #f0fdf4 !important;
    border-left: 3pt solid #22c55e !important;
    font-size: 10pt !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  a {
    color: black !important;
    text-decoration: none !important;
  }
}

/* =========================================================
   RESET
========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #ffffff;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  overflow-x: hidden;
}

a {
  text-decoration: none;
}


/* =========================================================
   MAIN PAGE
========================================================= */

.page-wrap {
  margin: 0 auto;
  position: relative;
  /* overflow: hidden; */
  background: #ffffff;
  width: 100%;
  min-height: 100vh;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 18px;

  position: relative;
  z-index: 10;

  background: #ffffff;
}


/* =========================================================
   LOGO
========================================================= */

.logocontainer img {
  width: 78px;
  height: auto;

  display: block;
}


/* =========================================================
   CONTACT PILL
========================================================= */

/* ── CONTACT PILL ── */
.contact-container {
  border: 1.5px solid var(--rs-primary);
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--rs-white);
}

.contact-text .label {
  font-size: 9px;
  color: #5A6A7E;
  font-weight: 500;
}

.contact-text .number {
  font-size: 11px;
  color: var(--rs-font);
  font-weight: 700;
}

.contact-link{
  display: flex;
  align-items: center;

  gap: 2px;

  text-decoration: none;

  background: #ffffff;
}


/* =========================================================
   CONTACT TEXT
========================================================= */

.contact-text {
  display: flex;
  flex-direction: column;

  line-height: 1.1;
}



/* =========================================================
   CALL ICON
========================================================= */

.call-icon-circle {
  width: 42px;
  height: 42px;

  min-width: 42px;

  display: flex;

  align-items: center;
  justify-content: center;
}

.call-icon-circle img {
  width: 95px;
  height: 123%;

  object-fit: contain;

  display: block;
}


/* =========================================================
   BACKGROUND
========================================================= */

.backgrnd {
  width: 100%;
}


/* =========================================================
   BOOK
========================================================= */

.book-section {
  position: relative;

  width: 100%;

  z-index: 2;
}

.main-image {
  width: 100%;

  display: block;

  border-radius: 18px 18px 0 0;

  height: 350px;

  object-fit: cover;
}


/* =========================================================
   BOOK LOADING
========================================================= */

.book-loading {
  width: 100%;
  height: 300px;

  display: flex;

  align-items: center;
  justify-content: center;

  background: #f5f5f5;

  color: #777;

  font-size: 18px;
}


/* =========================================================
   BOOK ERROR
========================================================= */

.book-error {
  width: 100%;
  height: 300px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px;

  text-align: center;

  background: #f5f5f5;

  color: #e53935;

  font-size: 17px;
}




.purple-section {
  position: relative;
  width: 100%;
  margin-top: -129px;
  z-index: 2;
}

.purple-bg {
  width: 100%;
  display: block;
  height: auto;
  min-height: calc(100vh - 28px);
  margin-top: 28px;
  object-fit: cover;
  object-position: bottom center;
}


/* =========================================================
   CONTENT
========================================================= */

.purple-card-content {
  position: absolute;

  top: 50px;

  left: 16px;

  width: calc(100% - 32px);

  display: flex;

  flex-direction: column;

  gap: 14px;

  z-index: 5;
}


/* =========================================================
   TOOLS WRAPPER
========================================================= */

.tools-wrapper {
  display: flex;

  flex-direction: row;

  align-items: stretch;

  gap: 12px;

  margin-top: 59px;
}

/* =========================================================
   LEFT TOOL LIST
========================================================= */

.learning-tools {
  display: flex;

  flex-direction: column;

  justify-content: space-between;

  flex: 1.3;
}


/* =========================================================
   TOOL LINK
========================================================= */

.tool-link {
  display: block;

  width: 100%;
}


/* =========================================================
   TOOL CARD
========================================================= */

.tool-card {
  width: 60%;

  height: 60px;

  /* display: block; */

  cursor: pointer;

  transition:
    transform 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
}


/* =========================================================
   AI SIDE
========================================================= */

.tools-side-image {
  flex: 1;

  display: flex;

  align-items: center;
  justify-content: center;
}


/* =========================================================
   AI LINK
========================================================= */

.ai-link {
  display: block;

  width: 100%;

  text-decoration: none;
}

#last-tool-img {
  height: 120px;
}


/* =========================================================
   AI ROBOT
========================================================= */

.ai-robot-img {
  width: 113%;

  max-width: 155px;

  display: block;

  transition: transform 0.15s ease;

  /* margin-left: -18px; */
}

.ai-robot-img:hover {
  transform: translateY(-2px);
}

/* =========================================================
   AI AVAILABLE - COMPACT
========================================================= */

.tools-wrapper.has-ai {
  justify-content: center;
  align-items: center;
  gap: 35px;
}

.tools-wrapper.has-ai .learning-tools {
  flex: 0 0 auto;
  width: 140px;
}

.tools-wrapper.has-ai .tools-side-image {
  flex: 0 0 auto;
  width: 140px;
}

.tools-wrapper.has-ai .tool-link {
  width: 100%;
}

.tools-wrapper.has-ai .tool-card {
  width: 100%;
}

.tools-wrapper.has-ai .ai-link {
  width: 100%;
}

.tools-wrapper.has-ai .ai-robot-img {
  width: 113%;
  max-width: 155px;
}

/* =========================================================
   WHEN AI KEY IS NOT AVAILABLE
========================================================= */

/* .tools-wrapper.no-ai {
  justify-content: center;
}

.tools-wrapper.no-ai .learning-tools {
  flex: none;
  width: 50%;
} */

/* =========================================================
   NO AI - 2 COLUMN GRID
========================================================= */

.tools-wrapper.no-ai {
  justify-content: center;
}

.tools-wrapper.no-ai .learning-tools {
  flex: none;
  margin-top: 10px;
  width: fit-content;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 25px;
}

.tools-wrapper.no-ai .tool-link {
  width: auto;
  display: flex;
  justify-content: center;
}

.tools-wrapper.no-ai .tool-card {
  width: 140px;
}


/* =========================================================
   CLASS SUBJECT CARD
========================================================= */

/* ── CLASS SUBJECT CARD ── */
.class-subject-pill-dynamic {
  width: 430px;
  height: 72px;
  background: var(--rs-white);
  border-radius: 40px;
  border: 2px solid var(--rs-primary);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 14px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0, 56, 106, 0.12);
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--rs-font);
}

.value {
  font-size: 14px;
  font-weight: 700;
  color: var(--rs-material-700);
  white-space: nowrap;
}

.csp-subject .value {
  color: var(--rs-cbo-primary-dark);
}

.divider {
  width: 2px;
  height: 34px;
  background: var(--rs-material-200);
  border-radius: 2px;
  flex-shrink: 0;
}


/* =========================================================
   ICON
========================================================= */

.csp-icon {
  width: 46px;
  height: 46px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.csp-icon img {
  width: 42px;
  height: 42px;

  object-fit: contain;
}


/* =========================================================
   CLASS / SUBJECT
========================================================= */

.csp-class,

.csp-subject {
  display: flex;

  align-items: center;

  gap: 4px;

  min-width: 0;
}


/* =========================================================
   LABEL
========================================================= */


/* =========================================================
   GRASS
========================================================= */

.bottom-grass {
  position: absolute;

  width: 100%;

  margin-top: -170px;

  z-index: 6;
}

.bottom-grass img {
  width: 100%;

  display: block;

  margin-bottom: 0;
}


/* =========================================================
   MOBILE
========================================================= */

/* =========================================================
   MOBILE (All Phones up to 767px)
========================================================= */

/* =========================================================
   MOBILE (All Phones up to 767px)
========================================================= */

/* =========================================================
   MOBILE (All Phones up to 767px)
========================================================= */

/* =========================================================
   MOBILE (All Phones up to 767px)
========================================================= */

@media (max-width: 767px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
    background: #ffffff;
  }

  /* Soft Pastel Pink-Lavender Top Backdrop */
  .page-wrap {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
      radial-gradient(120% 230px at 50% 42px, rgba(244, 164, 238, 0.34) 0%, rgba(248, 233, 247, 0.58) 55%, #ffffff 100%),
      linear-gradient(180deg, #F7E3F4 0%, #FCF3FA 34%, #FFFFFF 48%);
  }

  /* NAVBAR */
  .navbar {
    width: 100%;
    padding: 10px 14px 4px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    position: relative;
    z-index: 10;
  }

  .logocontainer img {
    width: 78px;
    height: auto;
  }

  .contact-container {
    padding: 2px 10px 2px 4px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(162, 98, 155, 0.14);
  }

  .call-icon-circle {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }

  .call-icon-circle img {
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  /* MAIN WRAPPER */
  .backgrnd,
  .desktop-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* BOOK SECTION + 3-RAY MAGENTA SPARKLES */
  .book-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 0 0 0;
    position: relative;
    z-index: 6;
  }

  .book-section::before,
  .book-section::after {
    content: "";
    position: absolute;
    top: 42%;
    width: 30px;
    height: 34px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'%3E%3Cpath d='M28 11 L11 3' stroke='%23C83795' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M27 18 L5 18' stroke='%23C83795' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M28 25 L11 33' stroke='%23C83795' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  .book-section::before {
    left: calc(50% - 126px);
  }

  .book-section::after {
    right: calc(50% - 126px);
    transform: scaleX(-1);
  }

  .main-image {
    width: 162px;
    height: 206px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid #ffffff;
    box-shadow: 0 10px 22px rgba(120, 15, 85, 0.30);
  }

  .book-loading,
  .book-error {
    width: 162px;
    height: 206px;
    border-radius: 16px;
  }

  /* PINK CARD SECTION */
  .purple-section {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -102px;
    border-top-left-radius: 50% 62px;
    border-top-right-radius: 50% 62px;
    overflow: hidden;
    z-index: 2;
  }

  .purple-bg {
    width: 104%;
    max-width: none;
    flex: 1;
    min-height: 550px;
    height: calc(100% + 36px);
    margin-top: -28px;
    object-fit: cover;
    object-position: top center;
    display: block;
  }

  /* CENTERED BUTTONS, AI CARD & PILL */
  .purple-card-content {
    position: absolute;
    top: 176px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 12px;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* TOOLS + ROBOT (Dead-Center & Equal Height) */
  .tools-wrapper,
  .tools-wrapper.has-ai {
    width: 100%;
    max-width: 344px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .tools-wrapper.has-ai .learning-tools {
    width: 164px;
    flex: 0 0 164px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent !important;
  }

  .tool-link {
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .tool-card {
    width: 100% !important;
    height: 45px !important;
    object-fit: contain;
    display: block;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .tools-side-image {
    width: 156px;
    flex: 0 0 156px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent !important;
  }

  .ai-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .ai-robot-img {
    width: 156px !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* TOOLS GRID (When AI is NOT available) */
  .tools-wrapper.no-ai {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    margin: 6px auto 0 auto;
  }

  .tools-wrapper.no-ai .learning-tools {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tools-wrapper.no-ai .tool-card {
    height: 48px !important;
  }

  /* CLASS SUBJECT PILL */
  .class-subject-pill-dynamic {
    width: 100%;
    max-width: 344px;
    height: 46px;
    background: #ffffff;
    border-radius: 999px;
    border: 2px solid var(--rs-primary);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 12px;
    gap: 6px;
    margin: 2px auto 0 auto;
    box-shadow: 0 6px 18px rgba(70, 10, 55, 0.25);
  }

  .csp-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  .csp-icon img {
    width: 22px;
    height: 22px;
  }

  .csp-class,
  .csp-subject {
    min-width: 0;
    overflow: hidden;
  }

  .label {
    font-size: 11px;
    color: var(--rs-font);
    flex-shrink: 0;
  }

  .value {
    font-size: 11.5px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .divider {
    height: 22px;
    background: var(--rs-material-200);
  }

  .bottom-grass {
    display: none;
  }
}

/* =========================================================
   TABLET / DESKTOP
========================================================= */

/* =========================================================
   TABLET / DESKTOP
========================================================= */

@media (min-width: 768px) {

  html,
  body {
    margin: 0;
    padding: 0;
  }

  .page-wrap {
    width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
  }

  /* =======================================================
     NAVBAR
  ======================================================= */
  .navbar {
    height: 60px;
    padding: 8px 20px;
    background: #ffffff;
  }

/* =======================================================
     MAIN BACKGROUND
  ======================================================= */
.backgrnd {
    width: 100%;
    height: calc(100vh - 60px);
    background: url("/assets/background.png") no-repeat center;
    background-size: 100% 100%;
    border-top-left-radius: 12vw 22vh;
    border-top-right-radius: 12vw 22vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* =======================================================
     DESKTOP CONTENT
  ======================================================= */
  .desktop-content {
    width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 45px;
  }

  /* =======================================================
     BOOK
  ======================================================= */
/* =======================================================
     BOOK
  ======================================================= */
  .book-section {
    width: 420px; /* Pehle 320px tha, ab bada kar diya */
    flex-shrink: 0;
  }

  .main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 1.5rem;
    object-fit: contain;
  }

  .book-loading,
  .book-error {
    width: 320px;
    height: 500px;
  }

  /* =======================================================
     RIGHT SIDE
  ======================================================= */
  .purple-section {
    width: 650px;
    margin: 40px 0 0 0;
  }

  /* =======================================================
     HIDE MOBILE BACKGROUND
  ======================================================= */
  .purple-bg {
    display: none;
  }

  /* =======================================================
     CONTENT
  ======================================================= */
  .purple-card-content {
    position: static;
    width: 74%;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* =======================================================
     BUTTON + ROBOT
  ======================================================= */
  .tools-wrapper,
  .tools-wrapper.has-ai,
  .tools-wrapper.no-ai {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    margin-top: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Bigger Buttons */
  .learning-tools {
    width: 380px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .tool-link,
  .tool-card {
    width: 100% !important;
    height: 90px;
    margin-bottom: 10px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Bigger AI */
  .tools-side-image,
  .ai-link {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .ai-robot-img {
    width: 220px;
    max-width: none;
    margin: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* AI KEY AVAILABLE */
  .tools-wrapper.has-ai {
    justify-content: center;
    align-items: center;
    gap: 40px;
  }

  .tools-wrapper.has-ai .learning-tools {
    flex: 0 0 auto;
    width: 45%;
  }

  .tools-wrapper.has-ai .tools-side-image {
    flex: 0 0 auto;
    width: 200px;
    display: flex;
    justify-content: center;
  }

  .tools-wrapper.has-ai .ai-robot-img {
    width: 100%;
    height: auto;
    max-width: 200px;
  }

  /* AI KEY NOT AVAILABLE */
  .tools-wrapper.no-ai .learning-tools {
    width: fit-content;
    column-gap: 40px;
    row-gap: 20px;
    margin-bottom: 20px;
  }

  .tools-wrapper.no-ai .tool-card {
    width: 180px;
  }

  /* =======================================================
     CLASS SUBJECT
  ======================================================= */
  .class-subject-pill-dynamic {
    width: 520px;
    height: 85px;
    margin: 0 25px 10px 0;
    border-radius: 22px;
  }

  .label {
    font-size: 18px;
  }

  .value {
    font-size: 19px;
    font-weight: 700;
  }

  .csp-icon img {
    width: 48px;
    height: 48px;
  }

  .divider {
    height: 45px;
  }

  /* =======================================================
     HIDE GRASS DESKTOP
  ======================================================= */
  .bottom-grass {
    display: none;
  }
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width: 1200px) {

  .desktop-content {
    width: 1200px;
  }

  .book-section {
    width: 320px;
  }

  .purple-section {
    width: 650px;
  }


}


/* =========================================================
   EXPLORE ACTIVITIES PAGE STYLES
========================================================= */

.activity-page {
  min-height: 100vh;
  background: #f7f6fe;
  font-family: "Nunito", sans-serif;
  display: flex;
  flex-direction: column;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 20;
}

.activity-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 70px);
}

.activity-sidebar {
  width: 320px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 16px;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.chapter-section {
  margin-bottom: 16px;
}

.chapter-title {
  width: 100%;
  text-align: left;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #f3f4f6;
  color: #211c3d;
  transition: all 0.2s;
}

.chapter-title.chapter-active {
  background: var(--rs-primary);
  color: #ffffff;
}

.activity-list {
  padding-left: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #55506e;
  transition: all 0.2s;
}

.activity-item.activity-active {
  background: var(--rs-material-700);
  color: #ffffff;
  font-weight: 700;
}

.activity-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #fbfaff;
}

.activity-title-section {
  background: #ffffff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
  border: 1px solid rgba(108, 92, 231, 0.1);
}

.question-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
  border: 1px solid rgba(108, 92, 231, 0.1);
}

.mcq-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s;
}

.mcq-option:hover {
  background: var(--rs-material-10);
  border-color: var(--rs-primary-soft);
}

.mcq-option.mcq-selected {
  background: var(--rs-material-50);
  border-color: var(--rs-primary);
}

@media (max-width: 768px) {
  .activity-layout {
    flex-direction: column;
  }
  .activity-sidebar {
    width: 100%;
    height: auto;
    max-height: 250px;
  }
}