@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --primary: #6D28D9;
  --primary-hover: #5B21B6;
  --primary-dark: #4C1D95;
  --primary-light: #8B5CF6;
  --primary-subtle: #F3E8FF;
  --accent-gold: #F59E0B;
  --accent-gold-dark: #D97706;
  --whatsapp: #25D366;
  --whatsapp-hover: #1EBE5D;
  --surface: #FFFFFF;
  --bg: #F8FAFC;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --shadow-sm: 0 2px 4px rgba(109, 40, 217, 0.05);
  --shadow-md: 0 8px 24px rgba(109, 40, 217, 0.08);
  --shadow-lg: 0 16px 40px rgba(109, 40, 217, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  direction: rtl;
  text-align: right;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
}

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

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

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #3B0764);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.4);
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-subtle);
}

.btn-whatsapp {
  background: linear-gradient(135deg, var(--whatsapp), #128C7E);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, var(--whatsapp-hover), #075E54);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 60px 0 80px;
  background: radial-gradient(circle at top right, #EDE9FE 0%, #F8FAFC 60%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-subtle);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 42px;
  font-weight: 900;
  color: #1E1B4B;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--primary);
  position: relative;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.trust-item i {
  color: var(--primary);
}

.hero-image-wrapper {
  position: relative;
}

.hero-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(109, 40, 217, 0.1);
  text-align: center;
}

.hero-flyer-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.hero-floating-badge {
  position: absolute;
  bottom: 24px;
  right: -20px;
  background: white;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  animation: floatAnim 4s ease-in-out infinite;
}

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

.floating-icon {
  width: 44px;
  height: 44px;
  background: #FEF3C7;
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-tag {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: #1E1B4B;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
}

/* Filters */
.filters-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}

/* Course Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  align-items: stretch;
}

.course-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(109, 40, 217, 0.2);
}

.course-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-discount-pill {
  background: linear-gradient(135deg, #FF0055 0%, #E11D48 45%, #FF5400 100%);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 1.5px #E11D48, 0 4px 12px rgba(225, 29, 72, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-discount-pill:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 0 2px #FF5400, 0 6px 16px rgba(255, 84, 0, 0.5);
}

.badge-discount-pill i {
  color: #FEF08A;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.course-card-badge {
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-in_person { background: #EDE9FE; color: var(--primary-dark); }
.badge-live_online { background: #E0F2FE; color: #0369A1; }
.badge-recorded { background: #DCFCE7; color: #15803D; }

.course-card-header {
  padding: 20px 20px 16px;
  background: linear-gradient(to bottom, #FAF5FF, #FFFFFF);
  border-bottom: 1px solid #F1F5F9;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.course-card-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
}

.course-card-title {
  font-size: 20px;
  font-weight: 800;
  color: #1E1B4B;
  line-height: 1.4;
  margin-bottom: 8px;
}

.course-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.course-card-body {
  padding: 20px 24px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #475569;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-meta-item i {
  color: var(--primary);
  width: 16px;
}

.course-topics-preview {
  margin-bottom: 16px;
}

.course-topics-preview h4 {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.course-topics-preview ul {
  list-style: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.course-topics-preview li {
  position: relative;
  padding-right: 18px;
  margin-bottom: 5px;
}

.course-topics-preview li::before {
  content: "◀";
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 9px;
  top: 4px;
}

.course-card-footer {
  padding: 16px 24px;
  background: #F8FAFC;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.course-watch-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: #FAF5FF;
  border: none;
  border-top: 1px solid #EDE9FE;
  color: #6D28D9;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.course-watch-bar:hover {
  background: #EDE9FE;
  color: #5B21B6;
}

.course-price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 11px;
  color: var(--text-muted);
}

.price-amount {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-dark);
}

.price-amount.free {
  color: #16A34A;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 50000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card, .modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  position: relative;
}

.modal-overlay.nested-modal {
  z-index: 60000 !important;
}

.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #1E1B4B;
}

.modal-close {
  background: #F1F5F9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.modal-body {
  padding: 24px 28px;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-main);
  background: #F8FAFC;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}

/* Floating WhatsApp Quick Button */
.floating-wa-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1500;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
}

.floating-wa-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

/* Footer */
.footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 60px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: white;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 10px;
}

.footer a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #1E293B;
  font-size: 13px;
}

/* ========================================================
   Mobile Navigation & Drawer System
   ======================================================== */
.mobile-nav-toggle {
  display: none;
  background: var(--primary-subtle);
  border: 1px solid #DDD6FE;
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-nav-toggle:hover {
  background: var(--primary);
  color: white;
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.open {
  display: block;
  opacity: 1;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(310px, 86vw);
  height: 100%;
  background: white;
  z-index: 2999;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to left, #FAF5FF, #FFFFFF);
}

.mobile-drawer-close {
  background: white;
  border: 1px solid #E2E8F0;
  color: #64748B;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-drawer-close:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

.mobile-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.mobile-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-drawer-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #1E293B;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-drawer-links li a:hover,
.mobile-drawer-links li a.active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.mobile-drawer-links li a i {
  font-size: 16px;
  color: #8B5CF6;
  width: 22px;
  text-align: center;
}

.mobile-drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.mobile-drawer-btn {
  width: 100%;
  padding: 12px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Two-column modal form helper */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ========================================================
   Responsive Media Queries: Tablets, iPads & Phones
   ======================================================== */

/* 1. Tablet Landscape & iPad Pro (<= 1024px) */
@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .hero-grid {
    gap: 28px;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-links a {
    font-size: 14px;
  }
}

/* 2. Tablet Portrait, iPad & Large Mobile (<= 992px) */
@media (max-width: 992px) {
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  .hero-content {
    max-width: 700px;
    margin: 0 auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-trust {
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero-image-wrapper {
    max-width: 440px;
    margin: 0 auto;
  }
  .hero-flyer-img {
    max-height: 420px;
  }
  .hero-floating-badge {
    right: 10px;
    bottom: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* 3. Standard Mobile Phones & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  /* Prevent automatic iOS zoom */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .container {
    padding: 0 16px;
  }
  .nav-content {
    padding: 10px 0;
  }
  .logo-badge {
    width: 38px;
    height: 38px;
    font-size: 20px;
    border-radius: 10px;
  }
  .logo-text h1 {
    font-size: 16px;
  }
  .logo-text p {
    display: none;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-actions .btn-primary {
    display: none;
  }
  #studentPortalBtn {
    padding: 7px 12px !important;
    font-size: 12px !important;
  }
  #studentPortalBtnText {
    display: inline;
  }

  /* Hero Section */
  .hero {
    padding: 36px 0 48px;
  }
  .hero-tag {
    font-size: 11.5px;
    padding: 5px 12px;
    margin-bottom: 14px;
  }
  .hero-title {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.35;
    margin-bottom: 14px;
  }
  .hero-desc {
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 22px;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 24px;
  }
  .hero-buttons .btn {
    width: 100%;
    padding: 12px 18px !important;
    font-size: 14.5px !important;
  }
  .hero-card {
    padding: 12px;
    border-radius: var(--radius-md);
  }
  .hero-flyer-img {
    max-height: 330px;
  }
  .hero-floating-badge {
    position: static;
    margin: 14px auto 0;
    width: fit-content;
    padding: 10px 16px;
    animation: none;
  }
  .hero-trust {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: right;
  }
  .trust-item {
    justify-content: center;
  }

  /* Courses & Filters */
  .section-header {
    margin-bottom: 28px;
  }
  .section-title {
    font-size: 24px;
    margin-bottom: 10px;
  }
  .section-desc {
    font-size: 14px;
  }
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .filters-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 4px 4px 12px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
  }
  .filters-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 12.5px;
  }
  .course-card-header {
    padding: 16px 16px 12px;
    min-height: auto;
  }
  .course-card-title {
    font-size: 17px;
  }
  .course-card-body {
    padding: 16px 16px;
  }
  .course-card-footer {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .course-card-footer .course-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .course-card-footer .btn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
  }

  /* Occasions & Why Us */
  .occasions-grid {
    grid-template-columns: 1fr !important;
  }

  /* Modals on Mobile & Tablet */
  .modal-overlay {
    padding: 12px;
    align-items: center;
  }
  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    border-radius: 16px;
  }
  .modal-header {
    padding: 16px 18px 14px;
  }
  .modal-header h3 {
    font-size: 17px;
  }
  .modal-body {
    padding: 16px 18px 20px;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Floating WhatsApp Button */
  .floating-wa-btn {
    bottom: 20px;
    left: 16px;
    width: 50px;
    height: 50px;
    font-size: 26px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* 4. Small Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  #studentPortalBtnText {
    display: none;
  }
  #studentPortalBtn::after {
    content: " دوراتي";
  }
  .hero-flyer-img {
    max-height: 280px;
  }
  .course-card-title {
    font-size: 16px;
  }
  .portal-tab-btn {
    padding: 8px 6px;
    font-size: 11.5px;
  }
}

/* Student Portal Styles */
.portal-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.portal-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.portal-tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.student-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.student-card:hover {
  border-color: #C4B5FD;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.08);
}

@keyframes fadeInToast {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.event-toast-item {
  animation: fadeInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modern Action Dropdown System */
.action-dropdown {
  position: relative;
  display: inline-block;
}

.action-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  background: white;
  min-width: 215px;
  max-width: calc(100vw - 24px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
  border: 1px solid #E2E8F0;
  padding: 6px;
  z-index: 999999;
  text-align: right;
  box-sizing: border-box;
}

.action-dropdown.open .action-dropdown-menu {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.action-dropdown-item:hover {
  background: #F3E8FF;
  color: #6D28D9;
}

.action-dropdown-item.danger {
  color: #DC2626;
}

.action-dropdown-item.danger:hover {
  background: #FEF2F2;
  color: #B91C1C;
}

.action-dropdown-divider {
  height: 1px;
  background: #F1F5F9;
  margin: 4px 0;
}

/* ===================================================
   Training Schedule & Calendar Styles
   =================================================== */
.schedule-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF5FF 50%, #F8FAFC 100%);
  border-top: 1px solid #EDE9FE;
  border-bottom: 1px solid #EDE9FE;
}

.cal-controls-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: white;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover {
  background: #F3E8FF;
  border-color: #A78BFA;
  color: #6D28D9;
}

.cal-nav-today-btn {
  padding: 6px 16px;
  border-radius: 10px;
  border: 1px solid #DDD6FE;
  background: #FAF5FF;
  color: #6D28D9;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-nav-today-btn:hover {
  background: #6D28D9;
  color: white;
}

.cal-view-toggle {
  display: inline-flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.cal-view-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cal-view-btn.active {
  background: white;
  color: #6D28D9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #475569;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cal-grid-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 30px rgba(109, 40, 217, 0.05);
  overflow-x: auto;
  padding: 16px;
}

.cal-grid-inner {
  min-width: 820px;
}

.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  text-align: center;
}

.cal-weekday-label {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  background: #F8FAFC;
  border-radius: 10px;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cal-cell {
  min-height: 115px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: #FAFAFC;
  border: 1px solid #F1F5F9;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.cal-cell:hover {
  background: white;
  border-color: #DDD6FE;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.06);
}

.cal-cell.is-other-month {
  background: #F8FAFC;
  opacity: 0.55;
}

.cal-cell.is-past-day {
  background: #F8FAFC;
}

.cal-cell.is-today {
  background: linear-gradient(180deg, #FEFCE8 0%, #FFFFFF 100%);
  border: 2px solid #EAB308 !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2), 0 6px 18px rgba(234, 179, 8, 0.15) !important;
  position: relative;
}

.cal-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cal-cell-num {
  font-size: 13.5px;
  font-weight: 800;
  color: #1E293B;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-cell.is-today .cal-cell-num {
  background: #CA8A04;
  color: white;
}

.cal-today-badge {
  font-size: 10px;
  font-weight: 800;
  background: #CA8A04;
  color: white;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.2px;
}

.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.cal-event-pill {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
  text-align: right;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cal-event-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Event states */
.cal-event-pill.enrolled {
  background: #EEF2FF;
  color: #3730A3;
  border-color: #C7D2FE;
}

.cal-event-pill.available {
  background: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.cal-event-pill.completed {
  background: #F1F5F9;
  color: #64748B;
  border-color: #E2E8F0;
  opacity: 0.8;
}

.cal-event-pill.trainer-slot {
  background: #FAF5FF;
  color: #6D28D9;
  border-color: #DDD6FE;
}

.cal-event-time {
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event-title {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
  display: block;
}

.cal-event-tag {
  align-self: flex-start;
  font-size: 8.5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

/* Mobile Agenda / Responsive */
@media (max-width: 900px) {
  .cal-cell {
    min-height: 90px;
    padding: 5px;
  }
  .cal-event-title {
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .cal-weekdays-row {
    display: none;
  }
  .cal-days-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cal-cell {
    min-height: auto;
    padding: 12px 14px;
    background: white;
    border: 1px solid #E2E8F0;
  }
  .cal-cell.is-other-month {
    display: none;
  }
  .cal-cell-header {
    border-bottom: 1px dashed #E2E8F0;
    padding-bottom: 6px;
    margin-bottom: 10px;
  }
  .cal-event-pill {
    padding: 8px 10px;
    font-size: 12px;
  }
  .cal-event-title {
    font-size: 12px;
    white-space: normal;
  }
}


