@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --stem-main: #0b0f19;
  --stem-card: rgba(17, 28, 51, 0.65);
  --stem-border: rgba(255, 255, 255, 0.08);
  --stem-accent: #0d9488;
  --stem-accent-glow: rgba(13, 148, 136, 0.15);
  --stem-text-title: #f8fafc;
  --stem-text-body: #cbd5e1;
  --stem-gold: #f59e0b;
}

.stem-page-wrapper {
  color: var(--stem-text-body);
  font-family: "Poppins", sans-serif;
  padding-top: 90px;
  padding-bottom: 70px;
  overflow-x: hidden;
}

/* RTL Layout support */
.stem-page-wrapper[dir="rtl"] {
  font-family: "Cairo", sans-serif;
  direction: rtl;
  text-align: right;
}

.stem-page-wrapper[dir="rtl"] h1,
.stem-page-wrapper[dir="rtl"] h2,
.stem-page-wrapper[dir="rtl"] h3,
.stem-page-wrapper[dir="rtl"] h4,
.stem-page-wrapper[dir="rtl"] h5,
.stem-page-wrapper[dir="rtl"] h6,
.stem-page-wrapper[dir="rtl"] p,
.stem-page-wrapper[dir="rtl"] span,
.stem-page-wrapper[dir="rtl"] a,
.stem-page-wrapper[dir="rtl"] button {
  font-family: "Cairo", sans-serif;
}

.stem-page-wrapper[dir="rtl"] .stem-badge {
  letter-spacing: 0;
  font-weight: 700;
}

/* Reverse right arrows in RTL */
.stem-page-wrapper[dir="rtl"] i.fa-arrow-right {
  transform: scaleX(-1);
}

.stem-page-wrapper[dir="rtl"] .stem-top-badge-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.stem-page-wrapper[dir="rtl"] .stem-tab-header {
  justify-content: center !important;
  width: 100% !important;
}

.stem-page-wrapper[dir="rtl"] .stem-tabs {
  direction: rtl;
  padding: 4px 6px !important;
  gap: 4px !important;
  align-items: center !important;
}

.stem-page-wrapper[dir="rtl"] .stem-tab-btn {
  white-space: nowrap !important;
  border-radius: 999px !important;
  font-family: "Cairo", sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.78rem !important;
  padding: 5px 12px !important;
  outline: none !important;
}

.stem-page-wrapper[dir="rtl"] .stem-quick-jump h5 {
  letter-spacing: 0;
}

.stem-page-wrapper[dir="rtl"] .stem-jump-link {
  font-family: "Cairo", sans-serif;
  font-weight: 600;
}

.stem-page-wrapper[dir="rtl"] .stem-section-header {
  text-align: center;
}

.stem-page-wrapper[dir="rtl"] .stem-section-header p {
  text-align: center;
}

.stem-page-wrapper[dir="rtl"] .stem-score-card,
.stem-page-wrapper[dir="rtl"] .stem-patent-alert,
.stem-page-wrapper[dir="rtl"] .stem-exam-info-card,
.stem-page-wrapper[dir="rtl"] .stem-camp-card,
.stem-page-wrapper[dir="rtl"] .stem-edu-text,
.stem-page-wrapper[dir="rtl"] .stem-grade-card,
.stem-page-wrapper[dir="rtl"] .stem-capstone-content {
  text-align: right;
}

.stem-top-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
}

.stem-top-badge-row .stem-badge {
  margin-bottom: 0;
}

.stem-btn-translate {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stem-border);
  color: var(--stem-text-title);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stem-btn-translate:hover {
  background: var(--stem-accent-glow);
  border-color: var(--stem-accent);
  color: var(--stem-text-title);
  box-shadow: 0 0 10px var(--stem-accent-glow);
}

/* Container */
.stem-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography & Headers */
.stem-page-wrapper h1,
.stem-page-wrapper h2,
.stem-page-wrapper h3,
.stem-page-wrapper h4 {
  font-family: "Outfit", sans-serif;
  color: var(--stem-text-title);
  letter-spacing: -0.02em;
}

.stem-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: var(--stem-accent);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.stem-section-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stem-section-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 60%, var(--stem-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.stem-section-header::after {
  content: '';
  display: block;
  width: 110px;
  height: 2px;
  background: linear-gradient(90deg,
      rgba(13, 148, 136, 0) 0%,
      rgba(13, 148, 136, 1) 50%,
      rgba(13, 148, 136, 0) 100%);
  margin-bottom: 12px;
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.4);
}

.stem-section-header p {
  font-size: 0.92rem;
  color: #94a3b8;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Glassmorphism Card base */
.stem-glass-card {
  background: var(--stem-card);
  border: 1px solid var(--stem-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stem-glass-card:hover {
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px var(--stem-accent-glow);
  transform: translateY(-3px);
}

/* Hero Section */
.stem-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 75px;
}

.stem-hero-text h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f8fafc 30%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stem-hero-text p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 24px;
}

.stem-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.stem-btn-primary {
  background: var(--stem-accent);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 18px rgba(13, 148, 136, 0.3);
}

.stem-btn-primary:hover {
  background: #0f766e;
  box-shadow: 0 6px 22px rgba(13, 148, 136, 0.45);
  transform: translateY(-1px);
}

.stem-btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stem-border);
  color: var(--stem-text-title);
}

.stem-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Video Wrapper */
.stem-video-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--stem-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.stem-video-container video {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
}

/* S-T-E-M Abbreviation Grid */
.stem-abbr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 75px;
}

.stem-abbr-card {
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stem-abbr-letter {
  font-family: "Outfit", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(180deg, var(--stem-accent) 0%, rgba(13, 148, 136, 0.2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.85;
}

.stem-abbr-card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.stem-abbr-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Quick Jump Navigation */
.stem-quick-jump {
  background: rgba(17, 28, 51, 0.45);
  border: 1px solid var(--stem-border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 65px;
  gap: 16px;
  flex-wrap: wrap;
}

.stem-quick-jump h5 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stem-jump-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stem-jump-link {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--stem-text-body);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stem-border);
  padding: 5px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.stem-jump-link:hover {
  background: var(--stem-accent-glow);
  border-color: var(--stem-accent);
  color: var(--stem-text-title);
}

/* Sections Base Styling */
.stem-section {
  padding: 60px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Admission Score Cards */
.stem-score-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.stem-score-card {
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.stem-score-gauge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--stem-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.stem-score-gauge.glow-teal {
  border-color: var(--stem-accent);
  box-shadow: 0 0 15px rgba(13, 148, 136, 0.25);
}

.stem-score-gauge.glow-gold {
  border-color: var(--stem-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.stem-score-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--stem-text-title);
  line-height: 1;
}

.stem-score-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
}

.stem-score-details h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.stem-score-details p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
}

.stem-patent-alert {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.stem-patent-alert i {
  color: var(--stem-gold);
  font-size: 1.2rem;
  margin-top: 2px;
}

.stem-patent-alert p {
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0;
  color: #e2e8f0;
}

/* Criteria Grid */
.stem-criteria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stem-criteria-item {
  padding: 20px;
  text-align: center;
}

.stem-criteria-item i {
  font-size: 1.4rem;
  color: var(--stem-accent);
  margin-bottom: 10px;
}

.stem-criteria-item p {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--stem-text-body);
  margin: 0;
}

/* Admission Exams Grid */
.stem-exams-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stem-exam-card {
  padding: 24px 20px;
  text-align: center;
}

.stem-exam-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--stem-accent);
  margin: 0 auto 16px auto;
}

.stem-exam-card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.stem-exam-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.stem-exam-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--stem-border);
}

.stem-exam-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

.stem-exam-info-card {
  background: rgba(17, 28, 51, 0.3);
  border: 1px solid var(--stem-border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.stem-exam-info-card p {
  font-size: 0.88rem;
  margin: 0;
  color: #94a3b8;
  line-height: 1.5;
  flex-grow: 1;
  max-width: 800px;
}

/* Daily Routine Tab Switcher */
.stem-tab-header {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto 32px !important;
  width: 100% !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
}

.stem-tabs {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--stem-border);
  padding: 4px 6px !important;
  border-radius: 999px !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  margin: 0 auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.stem-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem !important;
  font-weight: 600;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap !important;
  flex-shrink: 0;
  outline: none !important;
  overflow: hidden !important;
  position: relative;
  -webkit-tap-highlight-color: transparent !important;
}

.stem-tab-btn:hover:not(.active),
.stem-tab-btn:focus:not(.active),
.stem-tab-btn:focus-visible:not(.active),
.stem-tab-btn:active:not(.active) {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  outline: none !important;
  box-shadow: none !important;
}

.stem-tab-btn.active {
  background: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35) !important;
  font-weight: 700;
  border-radius: 999px !important;
  outline: none !important;
}

.stem-tab-content {
  display: none;
}

.stem-tab-content.active {
  display: block;
}

.stem-camp-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(17, 28, 51, 0.65) 100%);
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 28px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.stem-camp-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.stem-camp-card p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--stem-text-body);
}

.stem-routine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stem-routine-card {
  padding: 24px 20px;
}

.stem-routine-card i {
  font-size: 1.35rem;
  color: var(--stem-accent);
  margin-bottom: 14px;
}

.stem-routine-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.stem-routine-card p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
}

/* Education System Section */
.stem-edu-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.stem-edu-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stem-edu-feature {
  padding: 20px;
  text-align: center;
}

.stem-edu-feature i {
  font-size: 1.35rem;
  color: var(--stem-accent);
  margin-bottom: 10px;
}

.stem-edu-feature h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.stem-edu-feature p {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

.stem-edu-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.stem-edu-text p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #94a3b8;
  margin-bottom: 20px;
}

.stem-edu-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stem-edu-bullet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.5;
}

.stem-edu-bullet i {
  color: var(--stem-accent);
  font-size: 0.9rem;
  margin-top: 3px;
}

/* Grades Journey Timeline */
.stem-grades-deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stem-grade-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.stem-grade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.stem-grade-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.stem-grade-icon {
  font-size: 1.3rem;
  color: var(--stem-accent);
}

.stem-grade-weights {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.stem-weight-sub {
  text-align: center;
}

.stem-weight-sub span {
  display: block;
}

.stem-weight-pct {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--stem-text-title);
}

.stem-weight-pct.color-teal {
  color: var(--stem-accent);
}

.stem-weight-pct.color-gold {
  color: var(--stem-gold);
}

.stem-weight-lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

.stem-grade-card p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 20px;
  flex-grow: 1;
}

.stem-grade-card .stem-btn {
  width: 100%;
}

/* Exams & Capstone Section */
.stem-capstone-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.stem-capstone-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.stem-capstone-content p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94a3b8;
  margin-bottom: 20px;
}

.stem-capstone-pie {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stem-pie-item {
  background: rgba(0, 0, 0, 0.15);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.stem-pie-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--stem-accent);
}

.stem-pie-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stem-text-title);
  margin-top: 2px;
}

.stem-pie-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 4px;
}

.stem-capstone-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stem-edp-frame {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stem-border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 16px;
  max-width: 100%;
}

.stem-edp-frame img {
  width: 100%;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.stem-edp-frame img:hover {
  transform: scale(1.02);
}

.stem-edp-caption {
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .stem-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .stem-hero-actions {
    justify-content: center;
  }

  .stem-abbr-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stem-score-deck {
    grid-template-columns: 1fr;
  }

  .stem-exams-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stem-routine-grid {
    grid-template-columns: 1fr;
  }

  .stem-edu-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stem-grades-deck {
    grid-template-columns: 1fr;
  }

  .stem-capstone-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 868px) {
  .stem-page-wrapper {
    padding-top: 75px;
    padding-bottom: 40px;
  }

  .stem-quick-jump {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 40px;
    padding: 12px 14px;
  }

  .stem-jump-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }

  .stem-jump-links::-webkit-scrollbar {
    display: none;
  }

  .stem-criteria-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  /* Mobile RTL Layout Overrides */
  .stem-page-wrapper[dir="rtl"] .stem-top-badge-row {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
  }

  .stem-page-wrapper[dir="rtl"] .stem-btn-translate {
    align-self: flex-end;
    font-size: 0.78rem;
    padding: 5px 12px;
  }

  .stem-page-wrapper[dir="rtl"] .stem-badge {
    font-size: 0.74rem;
    line-height: 1.4;
    padding: 6px 12px;
    max-width: 100%;
    white-space: normal;
    border-radius: 999px;
  }

  .stem-page-wrapper[dir="rtl"] .stem-tab-header {
    justify-content: center !important;
    width: 100% !important;
    padding: 0 16px !important;
    margin: 0 auto 20px !important;
  }

  .stem-page-wrapper[dir="rtl"] .stem-tabs {
    direction: rtl;
    align-items: center !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    scrollbar-width: none !important;
  }

  .stem-page-wrapper[dir="rtl"] .stem-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .stem-page-wrapper[dir="rtl"] .stem-tab-btn {
    font-size: 0.76rem !important;
    padding: 5px 12px !important;
  }

  .stem-tab-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto 20px !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }

  .stem-tabs {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    border-radius: 999px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
  }

  .stem-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .stem-tab-btn {
    font-size: 0.76rem !important;
    padding: 5px 12px !important;
    border-radius: 999px !important;
    outline: none !important;
  }

  .stem-hero-text h1 {
    font-size: 1.95rem;
  }

  .stem-hero-text p {
    font-size: 0.88rem;
  }

  .stem-section-header h2 {
    font-size: 1.45rem;
  }

  .stem-abbr-grid {
    grid-template-columns: 1fr;
  }

  .stem-criteria-grid {
    grid-template-columns: 1fr;
  }

  .stem-exams-grid {
    grid-template-columns: 1fr;
  }

  .stem-score-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .stem-edu-visual {
    grid-template-columns: 1fr;
  }

  .stem-capstone-pie {
    grid-template-columns: 1fr;
  }

  .stem-btn {
    width: 100%;
  }
}