/* Inside your style.css */
body {
    font-family: 'Tajawal', sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.7;
}

/* ===== Base Styles & Resets ===== */
.card-img-top {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.btn i {
    margin-right: 5px;
    margin-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: var(--bs-breadcrumb-item-padding-x);
    padding-right: 0;
}

/* ===== Course Cards ===== */
.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.course-meta {
    font-size: 0.9rem;
    color: #666;
}
.course-meta i {
    margin-left: 5px;
}

/* ===== Category Styles ===== */
.category-title {
    position: relative;
    padding-right: 1.5rem;
}
.category-title i {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.category-card .card {
    transition: all 0.3s ease;
}
.category-card:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

.hover-effect {
    transition: all 0.3s ease;
}
.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ===== Course Detail Layout ===== */
.course-detail-container {
    background-color: #f8f9fa;
}

.course-header {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.course-meta .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* ===== Tab Styles ===== */
.nav-tabs {
    padding-right: 0;
}
.nav-tabs .nav-link {
    color: #495057;
    font-weight: 500;
}
.nav-tabs .nav-link.active {
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
}

/* ===== Accordion Styles ===== */
.accordion-button::after {
    margin-left: 0;
    margin-right: auto;
}
.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}
.accordion-button:focus {
    box-shadow: none;
}

/* ===== Alert/Message Styles ===== */
.alert {
    border-radius: 0.5rem;
    border-right: 4px solid transparent;
}
.alert i {
    font-size: 1.25rem;
}

.alert-success {
    border-right-color: var(--bs-success);
    background-color: rgba(25, 135, 84, 0.1);
}
.alert-danger {
    border-right-color: var(--bs-danger);
    background-color: rgba(220, 53, 69, 0.1);
}
.alert-warning {
    border-right-color: var(--bs-warning);
    background-color: rgba(255, 193, 7, 0.1);
}
.alert-info {
    border-right-color: var(--bs-info);
    background-color: rgba(13, 202, 240, 0.1);
}

/* ===== Button Enhancements ===== */
.btn-primary {
    transition: all 0.3s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== Loading Animations ===== */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
.spinner-border.text-primary {
    animation: pulse 1.5s infinite;
}

/* ===== Progress Indicators ===== */
.progress-indicator {
    position: relative;
    width: 24px;
    height: 24px;
}
.completed-badge {
    font-size: 0.8em;
}

/* ===== Responsive Adjustments ===== */


/* Ensure video controls are visible */
video::-webkit-media-controls {
    display: flex !important;
}

/* Specifically target the fullscreen button */
video::-webkit-media-controls-fullscreen-button {
    display: inline-block;
}

video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

video::-webkit-media-controls-panel {
    width: calc(100% + 30px); /* Adjust as needed */
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffc107 !important;
}

/* Login Page Specific Styles */
.card {
    border: none;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.toggle-password {
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

.input-group-text {
    background-color: #f8f9fa;
}

/* RTL Adjustments */
[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    margin-right: -1.5em;
    margin-left: 0;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    body {
        background-color: #f8f9fa !important;
    }
}

/* Registration Page Specific Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
}

.divider:after,
.divider:before {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

.input-group-text {
    min-width: 45px;
    justify-content: center;
}

/* Password Strength Meter */
.progress {
    height: 5px;
    background-color: #e9ecef;
}

/* RTL Adjustments */
[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    margin-right: -1.5em;
    margin-left: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {

 .dropdown-toggle {
    width: 100% !important;
    text-align: start;
    justify-content: space-between;
  }
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

      .dropdown-menu {
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.5rem;
  }

  .dropdown-item {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.4rem;
  }

  .dropdown-item:hover {
    background-color: #f8f9fa;
  }

   .category-card .card-body {
        padding: 1rem;
    }
    .category-card h3 {
        font-size: 1.2rem;
    }
    .course-header .row {
        flex-direction: column-reverse;
    }
    .course-header .col-md-4 {
        margin-bottom: 20px;
    }

    .user-menu-mobile {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw;
    border-radius: 0 0 1rem 1rem;
    padding: 0.75rem 1rem;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 9999;
  }

  .user-menu-mobile .dropdown-item {
    font-size: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
  }

  .user-menu-mobile .dropdown-divider {
    margin: 0.5rem 0;
  }

}

.completed-badge {
    transition: all 0.3s ease;
}

.loading-icon {
    transition: opacity 0.3s ease;
}


  .help-system {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1050;
  }
  
  .help-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    position: relative;
    z-index: 1051;
  }

  /* CSS fix */
#help-btn i {
  position: relative; /* or default */
  z-index: 1; /* ensure it's not hidden */
}

  
  .help-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 320px;
    background: white;
    display: none;
  }
  
  .help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .help-close {
    width: 25px;
    height: 25px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .help-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .help-option .btn {
    transition: all 0.2s;
  }
  
  .help-option .btn:hover {
    transform: translateX(5px);
  }
  
  @media (max-width: 576px) {
    .help-system {
      bottom: 15px;
      left: 15px;
    }
    
    .help-panel {
      width: 280px;
    }
  }

/* Add to your CSS file */
.btn .badge {
    font-size: 0.65rem;
    padding: 0.35em 0.65em;
    min-width: 1.5em;
    transform: translate(30%, -50%) !important; /* Adjust position */
}

/* For RTL support in Arabic */
[dir="rtl"] .btn .badge {
    left: auto !important;
    right: 100% !important;
    transform: translate(-30%, -50%) !important;
}

.category-title i {
    margin-inline-end: 10px; /* or 1rem */
}

pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: monospace;
    direction: ltr;
    text-align: left;
}

/* === TIMELINE STYLING === */
.timeline {
    position: relative;
    padding-right: 70px; /* space for line on the right */
    margin-top: 2rem;
}

/* vertical line */
.timeline::before {
    content: "";
    position: absolute;
    right: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--bs-primary), #dee2e6);
    border-radius: 2px;
}

/* each timeline item */
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* dot on the timeline */
.timeline-item::before {
    content: "";
    position: absolute;
    right: 23px;
    top: 22px;
    width: 16px;
    height: 16px;
    background-color: var(--bs-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    z-index: 2;
}

/* hover effect on item */
.timeline-item:hover {
    transform: translateY(-3px);
}

/* card inside timeline */
.timeline-item .card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.timeline-item .card:hover {
    box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.08);
}

/* responsive: stacked on small screens */
@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column;
    }
    .timeline-item .card {
        flex-direction: column !important;
    }
}

/* course thumbnail */
.timeline-item img {
    height: 100%;
    object-fit: cover;
}

/* title link */
.timeline-item h5 a {
    text-decoration: none;
    color: var(--bs-primary);
    transition: color 0.2s;
}

.timeline-item h5 a:hover {
    color: var(--bs-dark);
}

/* badges */
.timeline-item .badge {
    font-size: 0.85rem;
    border-radius: 0.5rem;
}



 /* Floating button styling */
  #request-course-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Tooltip label styling */
  .request-tooltip {
    position: absolute;
    right: 70px;
    bottom: 12px;
    background: #ffc107;
    color: #000;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    display: none;
    white-space: nowrap;
    transition: all 0.3s ease;
  }

  .course-request-system:hover .request-tooltip {
    display: block;
  }

  /* Request panel styling */
  .course-request-panel {
    display: none;
    width: 300px;
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #fff;
    z-index: 1102;
    border-radius: 20px;
  }

  /* Mobile adjustments */
  @media (max-width: 768px) {
    .course-request-panel {
      width: 90%;
      right: 5%;
      bottom: 90px;
    }

    .request-tooltip {
      position: absolute;
      bottom: 60px;
      right: 50%;
      transform: translateX(50%);
      background: #ffc107;
      color: #000;
      padding: 7px 14px;
      border-radius: 12px;
      font-weight: 600;
      font-size: 15px;
      box-shadow: 0 3px 6px rgba(0,0,0,0.15);
      display: block;
      margin-right: 50px;
    }

    #request-course-btn {
      width: 52px;
      height: 52px;
      font-size: 20px;
    }
  }