/**
 * Global theme variables – بذور تك / Buthoor Tech
 * Color palette (لوحة الألوان) – single source of truth for site identity.
 *
 * Variable        | Hex       | Usage
 * ----------------|-----------|------------------------------------------
 * Primary         | #2f275c   | العناوين، النصوص الغامقة، الفوتر
 * Secondary       | #00b4d8   | الأزرار، الروابط، التفاعل (Hover)
 * Accent          | #fbbf24   | النجوم، التنبيهات، العناصر المميزة
 */
 :root {
    --color-primary: #2f275c;
    --color-secondary: #00b4d8;
    --color-accent: #fbbf24;
    --color-background: #ffffff;
  }

  /* Apply theme to base elements */
  body {
    background-color: var(--color-background) !important;
  }

  h1, h2, h3, h4, h5, h6,
  .h1, .h2, .h3, .h4, .h5, .h6,
  strong, b {
    color: var(--color-primary) !important;
  }

  /* Course hero: override var(--color-primary), keep hierarchy */
  .course-hero h1,
  .course-hero h2,
  .course-hero h3,
  .course-hero h4,
  .course-hero h5,
  .course-hero h6,
  .course-hero .h1, .course-hero .h2, .course-hero .h3,
  .course-hero .h4, .course-hero .h5, .course-hero .h6,
  .course-hero strong,
  .course-hero b,
  .course-hero .course-hero__title {
    color: #fff !important;
  }
  .course-hero .course-hero__title-en {
    color: #00b4d8 !important;
  }
  .course-hero .course-hero__description,
  .course-hero .course-hero__description * {
    color: rgba(255, 255, 255, 0.88) !important;
  }

  /* Buttons and links – secondary (and hover) */
  a {
    color: var(--color-secondary) !important;
  }
  a:hover,
  a:focus {
    color: var(--color-secondary) !important;
  }

  .btn-primary,
  .btn.btn-primary,
  button.btn-primary,
  a.btn-primary {
    background-color: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    color: #fff !important;
  }
  .btn-primary:hover,
  .btn.btn-primary:hover,
  button.btn-primary:hover,
  a.btn-primary:hover {
    background-color: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    color: #fff !important;
    filter: brightness(1.1) !important;
  }

  /* WhatsApp button: green background, white text */
  .btn-whatsapp {
    background-color: #25d366 !important;
    border-color: #25d366 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }
  .btn-whatsapp:hover,
  .btn-whatsapp:focus {
    background-color: #20bd5a !important;
    border-color: #20bd5a !important;
    color: #fff !important;
    transform: translateY(-2px);
  }
  .btn-whatsapp i {
    font-size: 1.1em;
  }

  /* Yellow Register button: سجل معنا */
  .btn-register-yellow {
    background-color: #fbbf24 !important;
    border-color: #fbbf24 !important;
    color: #2c275f !important;
    box-shadow: 0 10px 15px -3px rgba(251, 191, 36, 0.3) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }
  .btn-register-yellow:hover,
  .btn-register-yellow:focus {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #2c275f !important;
    transform: translateY(-2px);
  }

  /* Induction Section Styles */
  .induction-section__content h2,
  .induction-section__content .h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c275f !important;
    line-height: 1.625;
  }
  @media (min-width: 768px) {
    .induction-section__content h2,
    .induction-section__content .h2 {
      font-size: 1.875rem;
    }
  }
  .induction-section__content p {
    color: #4b5563 !important;
    font-size: 1.125rem;
    line-height: 2;
  }

  /* Image with depth effect */
  .induction-section__image-wrap {
    position: relative;
  }
  .induction-section__image-bg {
    position: absolute;
    inset: 0;
    background-color: #00b4d8;
    border-radius: 1.5rem;
    transform: rotate(6deg);
    opacity: 0.1;
  }
  .induction-section__image {
    position: relative;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s ease;
    cursor: pointer;
  }
  .induction-section__image:hover {
    transform: rotate(0deg);
  }

  /* Accent: stars, alerts, highlighted elements */
  .star-rating .filled,
  .alert-warning,
  .badge-warning,
  .text-accent,
  .highlight {
    color: var(--color-accent) !important;
  }
  .bg-accent,
  .alert-warning,
  .badge-warning {
    background-color: var(--color-accent) !important;
  }

  /* Layout base: unified container for all sections (side margins) */
  .container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* ===== Footer (الفوتر) – wider container + compact links ===== */
  footer .footer-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
  footer .navbar-nav {
    padding-top: 2rem !important;
  }
  footer .navbar-nav .nav-link {
    font-size: 1.125rem !important;
    padding: 2px 0 !important;
    white-space: nowrap !important;
  }
  footer .navbar-nav .nav-item {
    margin-bottom: 0.25rem !important;
  }

  /* ===== Header (الهيدر) – white, fixed at top for full scroll, shadow ===== */
  body .main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08) !important;
  }
  body .main-header > .container {
    max-width: 95% !important;
    width: 95% !important;
  }
  /* Reserve space so content doesn’t sit under the fixed header */
  body {
    padding-top: 70px !important;
  }
  @media (min-width: 992px) {
    body {
      padding-top: 110px !important;
    }
  }
  .main-header .logo {
    display: flex;
    align-items: center;
  }
  .main-header .logo img {
    height: 3.5rem;
    width: auto;
    object-fit: contain;
  }
  .main-header .menu-container .main-menu .menu_item .menu_link:not(.none-line):not(.link-profile) {
    color: #2c275f !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
  }
  .main-header .menu-container .main-menu .menu_item .menu_link:hover:not(.none-line):not(.link-profile),
  .main-header .menu-container .main-menu .menu_item .menu_link.active {
    color: #2c275f !important;
  }
  /* احصل على التطبيق، تسجيل الدخول، إنضم إلينا – same font size */
  .main-header .navbar__tow .nav-link,
  .main-header .navbar__tow .get_our_app a {
    font-size: 0.9rem !important;
  }
  /* CTA: إنضم إلينا – cyan, white text, rounded-xl */
  .main-header .main-header__cta,
  .main-header .nav-item.bg_light_blue .nav-link,
  .main-header .navbar__tow .nav-item.bg_light_blue .nav-link {
    background-color: #007a99 !important;
    color: #ffffff !important;
    border-radius: 0.75rem !important;
    border: none !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 600 !important;
  }
  .main-header .main-header__cta:hover,
  .main-header .nav-item.bg_light_blue .nav-link:hover {
    background-color: #00607a !important;
    color: #fff !important;
  }
  @media (max-width: 991px) {
    .main-header .logo img {
      height: 2.5rem !important;
      width: auto !important;
    }
    .main-header .logo {
      display: flex !important;
      align-items: center !important;
    }
  }
  @media (min-width: 992px) {
    .main-header .menu--mobile {
      flex: 1;
      display: flex !important;
      align-items: center;
      min-width: 0;
    }
    /* First .menu-container is mobile-only (logo + close): hide on desktop */
    .main-header .menu--mobile > .menu-container:first-of-type {
      display: none !important;
    }
    /* Second .menu-container has nav links: center it */
    .main-header .menu--mobile > .menu-container:nth-of-type(2) {
      flex: 1;
      display: flex !important;
      justify-content: center;
      min-width: 0;
      margin-inline-start: 0 !important;
    }
    .main-header .menu--mobile > .menu-container:nth-of-type(2) .main-menu {
      display: flex !important;
      justify-content: center;
    }
    .main-header .menu--mobile > .menu-container:last-of-type {
      margin-inline-start: auto;
    }
  }
