/* Self-Hosted Local Alexandria Font Definitions (Instant 0ms Load Latency) */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Alexandria-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Alexandria-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Alexandria-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Alexandria-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Alexandria-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Alexandria-ExtraBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/Alexandria-Black.ttf') format('truetype');
}

:root {
  /* Official I.P.A Brand Guidelines Color Tokens */
  --ipa-blue: #1B75BB;
  --ipa-blue-glow: rgba(27, 117, 187, 0.25);
  --ipa-orange: #F6921E;
  --ipa-orange-glow: rgba(246, 146, 30, 0.3);
  --ipa-green: #93BE3E;
  --ipa-navy: #2A357D;
  
  /* Kids Accent Colors (Brandbook Section 2.5) */
  --ipa-kids-cyan: #52BFEF;
  --ipa-kids-yellow: #F4B942;
  --ipa-kids-emerald: #58D68D;
  --ipa-kids-pink: #EA5C84;
  
  /* Light Theme according to Brand Guidelines Section 2.4 */
  --bg-main: #F8FAFC;
  --bg-section: #EAEAEA;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  
  --text-main: #1E293B;
  --text-title: #2A357D;
  --text-muted: #475569;
  --text-light: #64748B;
  
  --font-brand: 'Alexandria', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Alexandria', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
}

img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

body[dir="rtl"] {
  text-align: right;
  direction: rtl;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Scroll Reveal Animations */
.reveal-item {
  opacity: 0;
  transform: translateY(35px);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.75s ease;
  will-change: transform, opacity;
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Top Notification Bar */
.top-bar {
  background: var(--ipa-navy);
  color: #FFFFFF;
  font-size: 13px;
  padding: 8px 0;
  font-weight: 500;
}

.top-bar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-info i {
  color: var(--ipa-orange);
  margin-right: 6px;
}

body[dir="rtl"] .top-info i {
  margin-right: 0;
  margin-left: 6px;
}

.top-tag {
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 12px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 12px;
  color: #FFD166;
  animation: pulseLight 2.5s infinite;
}

/* Navigation Bar & Logo Styling */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: var(--transition);
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

/* Reversed White Logo for Dark Backgrounds (Brand Guidelines Section 1.5) */
.footer-logo-img {
  height: 52px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: var(--transition);
}

.footer-logo-img:hover {
  opacity: 1;
  transform: scale(1.03);
}

.nav-menu-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  margin-left: 40px;
}

body[dir="rtl"] .nav-menu-container {
  margin-left: 0;
  margin-right: 40px;
}

.mobile-controls {
  display: none;
}

.lang-btn-desktop {
  display: inline-flex;
}

.lang-btn-mobile {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-weight: 700;
  color: var(--ipa-navy);
  transition: var(--transition);
  font-size: 15px;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--ipa-orange);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ipa-orange);
  border-radius: 3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  background: #FFFFFF;
  border: 2px solid var(--ipa-blue);
  color: var(--ipa-blue);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(27, 117, 187, 0.15);
}

.lang-btn:hover {
  background: var(--ipa-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(4px);
}

body[dir="rtl"] .btn:hover i {
  transform: translateX(-4px);
}

.btn.icon-only {
  padding: 12px;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ipa-blue), #145a90);
  color: #fff;
  box-shadow: 0 4px 15px var(--ipa-blue-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(27, 117, 187, 0.4);
}

.btn-orange {
  background: linear-gradient(135deg, var(--ipa-orange), #d87d12);
  color: #fff;
  box-shadow: 0 4px 15px var(--ipa-orange-glow);
}

.btn-orange:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(246, 146, 30, 0.4);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: var(--ipa-navy);
}

.btn-secondary:hover {
  background: #F1F5F9;
  border-color: var(--ipa-blue);
  color: var(--ipa-blue);
  transform: translateY(-2px);
}

/* Global Form Controls & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ipa-navy);
}

body[dir="rtl"] .form-label {
  text-align: right;
}

.form-control {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px 18px !important;
  background: #F8FAFC !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  font-size: 15px !important;
  font-family: var(--font-body) !important;
  outline: none !important;
  transition: var(--transition) !important;
  display: block !important;
}

body[dir="rtl"] .form-control {
  text-align: right !important;
  direction: rtl !important;
}

.form-control:focus {
  border-color: var(--ipa-blue) !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 12px var(--ipa-blue-glow) !important;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Asymmetric Modern Hero Section */
.hero {
  position: relative;
  padding: 85px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

body[dir="rtl"] .hero-content {
  text-align: right;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(27, 117, 187, 0.08);
  border: 1.5px solid var(--ipa-blue);
  color: var(--ipa-blue);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 24px;
  animation: badgeGlow 3s infinite;
}

.hero-title {
  font-family: var(--font-brand);
  font-size: 52px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--ipa-navy);
  letter-spacing: -0.5px;
}

body[dir="rtl"] .hero-title {
  line-height: 1.35;
  letter-spacing: normal;
}

.hero-title span.blue { color: var(--ipa-blue); }
.hero-title span.orange { 
  color: var(--ipa-orange);
  background: linear-gradient(135deg, #F6921E 0%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-bottom: 0.25em;
  margin-bottom: -0.25em;
  vertical-align: top;
}

body[dir="rtl"] .hero-title span.orange {
  display: inline-block;
  padding-bottom: 0.3em;
  margin-bottom: -0.3em;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
  font-weight: 500;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

body[dir="rtl"] .hero-cta-group {
  justify-content: flex-start;
}

.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid #E2E8F0;
}

body[dir="rtl"] .hero-trust-bar {
  justify-content: flex-start;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ipa-navy);
}

.trust-item i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.trust-item:hover i {
  transform: scale(1.2) rotate(10deg);
}

/* Right Side Hero Visual Composition */
.hero-visual-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: #FFFFFF;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  border: 2px solid #E2E8F0;
  animation: cardPulse 4s ease-in-out infinite;
}

.hero-img-container {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.hero-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-visual-card:hover .hero-img-container img {
  transform: scale(1.04);
}

/* Floating Glass Stat Chips */
.floating-chip {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1.5px solid #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  animation: floatArc 4s ease-in-out infinite;
}

.floating-chip.top-left {
  top: -20px;
  left: -20px;
}

body[dir="rtl"] .floating-chip.top-left {
  left: auto;
  right: -20px;
}

.floating-chip.bottom-right {
  bottom: -20px;
  right: -20px;
  animation-delay: 2s;
}

body[dir="rtl"] .floating-chip.bottom-right {
  right: auto;
  left: -20px;
}

.chip-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  transition: transform 0.3s ease;
}

.floating-chip:hover .chip-icon {
  transform: scale(1.15) rotate(12deg);
}

.chip-text {
  display: flex;
  flex-direction: column;
}

body[dir="rtl"] .chip-text {
  text-align: right;
}

.chip-text .val {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 15px;
  color: var(--ipa-navy);
}

.chip-text .lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* 3 External School Callouts Grid */
.callouts-section {
  padding: 40px 0 60px;
}

.callouts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.callout-card {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

body[dir="rtl"] .callout-card {
  text-align: right;
  flex-direction: row;
}

.callout-card:hover {
  transform: translateY(-6px);
  border-color: var(--ipa-orange);
  box-shadow: 0 16px 35px rgba(246, 146, 30, 0.2);
}

.callout-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  flex-shrink: 0;
  transition: var(--transition);
}

.callout-card:hover .callout-icon {
  transform: scale(1.15) rotate(8deg);
}

.callout-card:nth-child(1) .callout-icon { background: linear-gradient(135deg, var(--ipa-blue), #145a90); }
.callout-card:nth-child(2) .callout-icon { background: linear-gradient(135deg, var(--ipa-orange), #d87d12); }
.callout-card:nth-child(3) .callout-icon { background: linear-gradient(135deg, var(--ipa-green), #7ba32e); }

.callout-title {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  color: var(--ipa-navy);
}

.callout-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Horizontal Animated Stats Bar Grid */
.stats-bar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.stat-card {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--ipa-blue);
  box-shadow: 0 14px 30px rgba(27, 117, 187, 0.15);
}

.stat-card h3 {
  font-family: var(--font-brand);
  font-size: 42px;
  font-weight: 900;
  color: var(--ipa-orange);
  line-height: 1;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.stat-card:hover h3 {
  transform: scale(1.08);
}

.stat-card p {
  font-size: 15px;
  font-weight: 700;
  color: var(--ipa-navy);
}

/* Course Grid Cards & Kids Accent Colors (Brandbook Section 2.5) */
.section { padding: 75px 0; }
.section-header { margin-bottom: 44px; text-align: center; }
.section-title { font-family: var(--font-brand); font-size: 36px; font-weight: 900; color: var(--ipa-navy); }
.section-desc { color: var(--text-muted); font-size: 16px; margin-top: 10px; font-weight: 500; }

body[dir="rtl"] .section-title { text-align: center; }

/* ==========================================================================
   Cascading Interactive Filter Panel (Program -> Grade -> Subject -> Search)
   ========================================================================== */
.cascading-filter-panel {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-top: 28px;
  margin-bottom: 36px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
  position: relative;
  transition: var(--transition);
}

.cascading-filter-panel:hover {
  border-color: #CBD5E1;
  box-shadow: 0 16px 45px rgba(27, 117, 187, 0.08);
}

.filter-grid-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1.2fr;
  gap: 18px;
  align-items: flex-end;
}

@media (max-width: 992px) {
  .filter-grid-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .filter-grid-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cascading-filter-panel {
    padding: 18px;
  }
}

.filter-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.filter-field-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ipa-navy);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
}

.filter-select-wrapper,
.filter-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-select {
  width: 100%;
  height: 48px;
  padding: 0 38px 0 16px;
  background-color: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ipa-navy);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: var(--transition);
}

body[dir="rtl"] .filter-select {
  padding: 0 16px 0 38px;
  text-align: right;
}

.filter-select:hover {
  background-color: #FFFFFF;
  border-color: var(--ipa-blue);
}

.filter-select:focus {
  background-color: #FFFFFF;
  border-color: var(--ipa-blue);
  box-shadow: 0 0 0 3.5px rgba(27, 117, 187, 0.15);
}

.filter-select-icon {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: var(--ipa-blue);
  font-size: 12px;
  transition: transform 0.2s ease;
}

body[dir="rtl"] .filter-select-icon {
  right: auto;
  left: 14px;
}

.filter-search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  background-color: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ipa-navy);
  outline: none;
  transition: var(--transition);
}

body[dir="rtl"] .filter-search-input {
  padding: 0 42px 0 16px;
  text-align: right;
}

.filter-search-input:hover {
  background-color: #FFFFFF;
  border-color: var(--ipa-orange);
}

.filter-search-input:focus {
  background-color: #FFFFFF;
  border-color: var(--ipa-orange);
  box-shadow: 0 0 0 3.5px rgba(246, 146, 30, 0.15);
}

.filter-search-icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
  color: var(--text-muted);
  font-size: 14px;
}

body[dir="rtl"] .filter-search-icon {
  left: auto;
  right: 14px;
}

/* Filter Status & Active Pills Bar */
.filter-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(27, 117, 187, 0.08);
  color: var(--ipa-blue);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
}

.btn-reset-filters {
  background: transparent;
  border: 1px solid #CBD5E1;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-reset-filters:hover {
  background: #FEE2E2;
  border-color: #F87171;
  color: #DC2626;
  transform: translateY(-1px);
}

/* Course Grid */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  min-height: 200px;
  position: relative;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body[dir="rtl"] .course-card {
  text-align: right;
}

.course-card:nth-child(4n+1) { border-top: 5px solid var(--ipa-kids-cyan); }
.course-card:nth-child(4n+1) .course-cat-tag { background: var(--ipa-kids-cyan); color: #0F172A; }
.course-card:nth-child(4n+2) { border-top: 5px solid var(--ipa-kids-yellow); }
.course-card:nth-child(4n+2) .course-cat-tag { background: var(--ipa-kids-yellow); color: #0F172A; }
.course-card:nth-child(4n+3) { border-top: 5px solid var(--ipa-kids-emerald); }
.course-card:nth-child(4n+3) .course-cat-tag { background: var(--ipa-kids-emerald); color: #0F172A; }
.course-card:nth-child(4n+4) { border-top: 5px solid var(--ipa-kids-pink); }
.course-card:nth-child(4n+4) .course-cat-tag { background: var(--ipa-kids-pink); color: #FFFFFF; }

.course-card:hover { transform: translateY(-8px) scale(1.01); box-shadow: 0 22px 45px rgba(0, 0, 0, 0.12); }
.course-thumb { 
  height: 200px; 
  position: relative; 
  overflow: hidden; 
  border-bottom: 1px solid #E2E8F0; 
  background: linear-gradient(135deg, #1B75BB 0%, #0F172A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); display: block; }
.course-card:hover .course-thumb img { transform: scale(1.08); }

.course-cat-tag { position: absolute; top: 14px; left: 14px; padding: 5px 16px; border-radius: 50px; font-size: 12px; font-weight: 800; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); z-index: 2; transition: transform 0.3s ease; }
.course-card:hover .course-cat-tag { transform: scale(1.05); }

body[dir="rtl"] .course-cat-tag { left: auto; right: 14px; }
.course-body { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.course-title { font-family: var(--font-brand); font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--ipa-navy); }
.course-summary { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }

.course-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #F1F5F9;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.course-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid #E2E8F0; }
.course-price { font-family: var(--font-brand); font-size: 24px; font-weight: 900; color: var(--ipa-navy); }
.course-price.is-free { color: var(--ipa-green); font-size: 18px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }

.course-grade-badge {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body[dir="rtl"] .course-grade-badge {
  right: auto;
  left: 14px;
}

/* Load More & Dynamic Action Area */
.load-more-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 48px;
  gap: 14px;
}

.btn-load-more {
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(246, 146, 30, 0.28);
  transition: var(--transition);
  cursor: pointer;
}

.btn-load-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(246, 146, 30, 0.4);
}

.btn-load-more:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.all-loaded-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  background: #F1F5F9;
  padding: 8px 20px;
  border-radius: 50px;
}

/* Dynamic Empty State */
.courses-empty-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  background: #FFFFFF;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.courses-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(246, 146, 30, 0.1);
  color: var(--ipa-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
}

.courses-empty-title {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 800;
  color: var(--ipa-navy);
  margin-bottom: 8px;
}

.courses-empty-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Skeleton Loading Pulse */
.course-card-skeleton {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 420px;
  animation: cardPulse 1.5s ease-in-out infinite;
}

/* Interactive FAQ Accordion Styling */
.faq-item {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--ipa-blue);
  box-shadow: 0 6px 18px rgba(27, 117, 187, 0.08);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  color: var(--ipa-navy);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

body[dir="rtl"] .faq-question {
  text-align: right;
}

.faq-question:hover {
  color: var(--ipa-orange);
}

.faq-icon {
  font-size: 16px;
  color: var(--ipa-blue);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--ipa-orange);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
  padding: 0 24px;
  background: #FFFFFF;
  border-top: 0px solid transparent;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding: 16px 24px 24px;
  border-top: 1px solid #E2E8F0;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* About & Contact Sections */
.about-grid, .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: flex-start;
}

.about-card, .contact-card {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
}

body[dir="rtl"] .about-card, body[dir="rtl"] .contact-card {
  text-align: right;
}

body[dir="rtl"] .about-card ul {
  padding-right: 0;
}

body[dir="rtl"] .about-card ul li i {
  margin-right: 0;
  margin-left: 8px;
}

.contact-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Contact Info Tiles */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-tile {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

body[dir="rtl"] .contact-tile {
  text-align: right;
  flex-direction: row;
}

.contact-tile:hover {
  transform: translateY(-4px);
  border-color: var(--ipa-blue);
  box-shadow: 0 14px 30px rgba(27, 117, 187, 0.15);
}

.contact-tile-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.contact-tile:hover .contact-tile-icon {
  transform: scale(1.15) rotate(6deg);
}

.contact-tile-title {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  color: var(--ipa-navy);
}

.contact-tile-desc {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Floating AI Assistant Chatbot Widget */
.chatbot-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2500;
}

body[dir="rtl"] .chatbot-widget {
  right: auto;
  left: 28px;
}

.chatbot-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--ipa-blue), var(--ipa-orange));
  box-shadow: 0 10px 30px rgba(27, 117, 187, 0.45);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseGlow 3s infinite;
}

.chatbot-btn:hover {
  transform: scale(1.1) rotate(4deg);
  box-shadow: 0 15px 35px rgba(246, 146, 30, 0.55);
}

.chatbot-btn-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.chatbot-online-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #58D68D;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

body[dir="rtl"] .chatbot-online-dot {
  right: auto;
  left: 2px;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.chatbot-window {
  position: fixed;
  bottom: 108px;
  right: 28px;
  width: 390px;
  height: 530px;
  background: #FFFFFF;
  border: 2px solid var(--ipa-blue);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 2500;
}

body[dir="rtl"] .chatbot-window { right: auto; left: 28px; }
.chatbot-window.active { opacity: 1; pointer-events: all; transform: translateY(0); }
.chatbot-header { background: linear-gradient(135deg, var(--ipa-navy), var(--ipa-blue)); color: #fff; padding: 16px; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-brand); }
.chatbot-body { flex-grow: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #F8FAFC; }
.chat-bubble { padding: 12px 16px; border-radius: 14px; font-size: 14px; max-width: 85%; line-height: 1.5; }
.chat-bot { background: #E2E8F0; color: var(--ipa-navy); align-self: flex-start; }
.chat-user { background: var(--ipa-blue); color: #fff; align-self: flex-end; }
.chatbot-footer { padding: 14px; background: #fff; border-top: 1px solid #E2E8F0; display: flex; gap: 8px; }
.chatbot-input { flex-grow: 1; padding: 10px 16px; border: 1.5px solid #CBD5E1; border-radius: var(--radius-md); outline: none; font-family: var(--font-body); }

/* Footer */
.footer {
  background: var(--ipa-navy);
  color: #FFFFFF;
  padding: 70px 0 0;
  margin-top: 80px;
}

.footer-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

body[dir="rtl"] .footer-wrapper {
  text-align: right;
}

body[dir="rtl"] .footer-col ul {
  padding-right: 0;
}

.footer-desc { color: #CBD5E1; font-size: 14px; margin: 18px 0; max-width: 340px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer-socials a:hover { background: var(--ipa-orange); transform: translateY(-3px); }

.footer-col h4 { font-family: var(--font-brand); font-size: 18px; font-weight: 800; margin-bottom: 20px; color: var(--ipa-orange); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: #CBD5E1; }
.footer-col ul a:hover { color: #FFFFFF; text-decoration: underline; }

.footer-bottom { background: rgba(0,0,0,0.25); padding: 20px 0; text-align: center; font-size: 13px; color: #94A3B8; border-top: 1px solid rgba(255,255,255,0.08); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatArc { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 8px 25px rgba(27, 117, 187, 0.45); } 50% { box-shadow: 0 14px 35px rgba(246, 146, 30, 0.65); } }
@keyframes pulseLight { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }
@keyframes badgeGlow { 0%, 100% { box-shadow: 0 0 10px rgba(27, 117, 187, 0.1); } 50% { box-shadow: 0 0 18px rgba(27, 117, 187, 0.3); } }
@keyframes cardPulse { 0%, 100% { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); } 50% { box-shadow: 0 25px 60px rgba(27, 117, 187, 0.18); } }

@media (max-width: 992px) {
  .hero-grid, .callouts-grid, .stats-bar-grid, .about-grid, .contact-grid, .footer-wrapper { grid-template-columns: 1fr; }
  .contact-card .form-row { grid-template-columns: 1fr; }
}

/* Mobile Hamburger Button & Responsive Navigation Drawer */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ipa-navy);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  background: rgba(27, 117, 187, 0.1);
  color: var(--ipa-orange);
}

/* Floating PWA Install Prompt Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 480px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 2px solid var(--ipa-blue);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 3000;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pwa-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
}

.pwa-banner-text strong {
  font-family: var(--font-brand);
  font-size: 15px;
  color: var(--ipa-navy);
}

.pwa-banner-text span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-dismiss-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 600;
}

.pwa-dismiss-btn:hover {
  color: #EF4444;
}

@media (max-width: 991px) {
  .nav-wrapper {
    position: relative;
    justify-content: space-between;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .lang-btn-mobile {
    display: inline-flex;
    padding: 6px 14px;
    font-size: 13px;
  }

  .lang-btn-desktop {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(27, 117, 187, 0.08);
    border-radius: var(--radius-md);
    font-size: 20px;
    color: var(--ipa-navy);
    border: none;
    cursor: pointer;
    transition: var(--transition);
  }

  .nav-menu-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 3px solid var(--ipa-blue);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    z-index: 2000;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .nav-menu-container.mobile-open {
    display: flex !important;
    animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0;
  }

  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
  }

  .nav-action-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-grid, .callouts-grid, .stats-bar-grid, .about-grid, .contact-grid, .footer-wrapper {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top-bar-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .top-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
    text-align: center;
  }

  .grade-filter-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    justify-content: flex-start;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-details-grid {
    grid-template-columns: 1fr !important;
  }

  .chatbot-window {
    width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
    bottom: 90px;
    height: 70vh;
  }

  body[dir="rtl"] .chatbot-window {
    right: 16px;
    left: 16px;
  }

  .pwa-install-banner {
    left: 12px;
    right: 12px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .pwa-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .brand-logo-img {
    height: 40px;
  }

  .hero-title {
    font-size: 24px;
  }

  .btn {
    padding: 12px 18px;
    font-size: 14px;
  }
}
