body {
  font-family: "Tajawal", sans-serif;
  background: #FFF4FF !important;
  color: #333;
  direction: rtl;
      font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}
.auth-buttons {
  display: flex;
  gap: 12px;
  font-family: 'Tajawal', sans-serif;
}

.auth-buttons a {
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 28px;
  border-radius: 10px;
  transition: 0.3s ease;
}

/* تسجيل الدخول */
.login {
  color: #ffffff;
  border: 2px solid #56795B;
  background-color: transparent;
}

.login:hover {
  background-color: #56795B;
  color: #fff !important;
}

/* انشاء حساب */
.register,
.register:link,
.register:visited,
.register:hover,
.register:active {
  background-color: #56795B !important;
  color: #fff !important;
  border: 2px solid #56795B !important;
  font-weight: bold;
  text-decoration: none !important;
}

.register:hover {
  background-color: #46624A;
  border-color: #46624A;
}


@media (max-width: 1400px) {
  .auth-buttons {
    gap: 10px;
    max-width: 150px;
    font-size: 19px;
  }
  .auth-buttons a {
    font-size: 14px;
    padding: 8px 20px;
  }
}


@media (max-width: 1386px) {
  .auth-buttons {
    gap: 10px;
    min-width: 200px;
    
  }

  .auth-buttons a {
        min-width: 190px;
    padding: 8px 20px;
  }
}
/* 🔹 Responsive Auth Buttons */
@media (max-width: 768px) {
  .auth-buttons {
    gap: 10px;
  }

  .auth-buttons a {
    font-size: 14px;
    min-width: 50px;
    padding: 8px 20px;
  }
}

@media (max-width: 480px) {
  .auth-buttons {
    flex-direction: column; /* stack the buttons */
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .auth-buttons a {
    width: 80%;
    text-align: center;
    font-size: 15px;
    padding: 10px 0;
    border-radius: 8px;
  }
}
.course-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  margin-top: 100px;
  max-width: 1600px;
margin: 0 auto;
margin-top: 100px;}

/* SIDEBAR */
.course-sidebar {
  width: 25%;
}
.lesson-list {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* ✅ Scroll only when there are more than ~5 lessons */
  max-height: 400px; /* adjust height as needed */
  overflow-y: auto;
}

/* Optional: customize scrollbar look */
.lesson-list::-webkit-scrollbar {
  width: 8px;
}

.lesson-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.lesson-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.course-info-card {
  background: #fff;
  border-radius: 20px;
  margin-top: 40px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  position: static;
  top: 20px;
}
.review-meta-top {
  display: flex;
  flex-direction: column; /* stack vertically */
  align-items: flex-start; /* right alignment for RTL */
  direction: rtl; /* ensure Arabic flow */
  gap: 4px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 6px;
}

.review-meta-top strong {
  font-weight: 600;
}

.review-meta-top span {
  color: #777;
  font-size: 0.9rem;
  margin-top: 5px;
}

.review-text {
  background: #f8f3fc;
  border-radius: 10px;
  padding: 10px;
  color: #333;
  line-height: 1.6;
}

.price {
  color: #020202;
  font-weight: bold;
  font-size: 1.2rem;
}

.buy-btn {
  background: #56795B;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
}

.purchased-msg {
  color: #3a7f43;
  font-weight: bold;
}

/* MAIN SECTION */
.course-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* VIDEO */
.video-section {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  padding: 20px;
}

.lesson-video {
  width: 100%;
  min-height: 600px;
  border-radius: 16px;
  margin-bottom: 15px;
}



.lesson-video {
    /* ... existing styles ... */
    
    /* 1. Eliminate space caused by inline behavior */
    display: block !important; 
    
    /* 2. Optional: Ensure the wrapper doesn't have extra height */
}

/* If the space is actually coming from the wrapper div: */
.lesson-video-wrapper {
    /* Ensure the parent is tightly wrapping the video */
    line-height: 0 !important; 
}
/* LESSON LIST */
.lesson-list {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);

}
.lesson-details {
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes title and lock apart */
  width: 100%;
}
.lesson-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.lesson-item:last-child {
  border-bottom: none;
}
.lesson-details span {
  flex: 1; /* title takes remaining space */
}
.lesson-item.locked {
  opacity: 0.6;
}

.lock-icon {
  margin-right: auto; /* now works */
  font-size: 1.2rem;
  color: #b33;
  display: flex;
  align-items: center;
  margin-right: 700px;
}
@media (max-width: 992px) {
  .lock-icon {
    margin-right: 0; /* Adjust for smaller screens */
    margin-right: 0;
  }
}

.play-btn {

  color: #fff;
  padding: 6px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
}
.play-btn img{
  width: 35px;
}
/* REVIEWS */
.reviews-section {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);

}
.login{
  color: #b33b70;
  font-weight: bold;
}
.register{
  color: #56795B;
  font-weight: bold;
}
.reviews-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.review-card {
  flex: 1;
  background: #faf5ff;
  border-radius: 16px;
  padding: 16px;
  min-width: 250px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 16px;
        font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}
.telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* space between text and icon */
  border: 1.5px solid #56795B; /* thin green border */
  border-radius: 10px;
  padding: 8px 18px;
  text-decoration: none;
  color: #56795B;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  direction: rtl; /* ensure correct Arabic layout */
}

.telegram-btn img {
  width: 24px;
  height: 24px;
}

.telegram-btn:hover {
  background: linear-gradient(135deg, #e3e4e3, #9c9e9c);
  border: 1.5px solid #56795B; /* thin green border */
  border-color: transparent;
}


.review-text {
  color: #5a2e6e;
    font-size: 16px;
        font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}

.review-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.review-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
    font-size: 16px;
        font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}

.review-form textarea {
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 10px;
  max-width: 400px;
  font-size: 16px;
        font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}

.review-form button {
  background: #7e2b83;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
    background: linear-gradient(135deg, #56795B, #69956F);
    font-size: 18px;
          font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
    max-width: 400px;
}
/* 📱 RESPONSIVE DESIGN */
/* Stars inside the form (for selecting a rating) */
.rating-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.rating-stars input {
  display: none;
}

.rating-stars label {
  font-size: 2rem;
  color: #ccc; /* gray by default */
  cursor: pointer;
  transition: color 0.2s ease;
}

/* When hovering */
.rating-stars label:hover,
.rating-stars label:hover ~ label {
  color: #ffca28;
}

/* When selected */
.rating-stars input:checked ~ label {
  color: #ffca28;
}

/* ---------------------------------- */
/* Stars shown inside existing reviews */
.review-stars {
  display: flex;
  gap: 3px;
}

.review-stars .star {
  font-size: 1.5rem;
  color: #ccc;
}

/* The stars that should appear yellow */
.review-stars .star.filled {
  color: #ffca28 !important;
}

/* Tablets and smaller screens */
@media (max-width: 992px) {
  .course-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
  }

  .course-sidebar {
    width: 90%;
    order: 2; /* move it below the main content */
  }

  .course-info-card {
    position: static; /* remove sticky for smaller screens */
    margin-top: 0;
  }

  .course-main {
    width: 100%;
    order: 1;
  }

  .lesson-list, .video-section, .reviews-section {
    width: 100%;
  }

  .lesson-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .lesson-item .play-btn {
    margin-top: 6px;
  }

  .reviews-grid {
    flex-direction: column;
  }

  .review-card {
    width: 100%;
  }
}

/* 📱 Small mobile screens */
@media (max-width: 600px) {
  .course-container {
    padding: 0.5rem;
  }

  .lesson-video {
    height: auto;
    max-height: 300px;
  }

  .buy-btn, .review-form button {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
  }

  .course-info-card h3 {
    font-size: 1.3rem;
  }

  .lesson-item span {
    font-size: 0.95rem;
  }

  .lesson-title {
    font-size: 1.2rem;
  }

  .lesson-desc {
    font-size: 0.95rem;
  }
}


.lesson-title {
  white-space: nowrap;
  overflow: visible;     /* ✅ allow full text to show */
  text-overflow: clip;   /* no ellipsis */
  display: inline-block;
  width: auto !important; /* allow full width */
}

.site-footer {
  padding: 40px 20px 20px;
  font-family: "Cairo", sans-serif;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #FDF9FC !important;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 20px;
}

.footer-left,
.footer-center,
.footer-right {
  flex: 1 1 250px;
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.footer-icon {
  width: 30px;
  height: 30px;
}

/* Newsletter */
.newsletter-container {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 40px;
}

.newsletter-form input {
  padding: 10px;
  width: 437px;
  border: 1px solid #6E2753;
  min-width: 200px;
  flex: 1;
  text-align: right;
}

.newsletter-form button {
  padding: 10px 20px;
  background-color: #6E2753;
  color: #fff;
  border: none;
  min-width: 200px;
  cursor: pointer;
}

/* Right section */
.footer-right h4 {
  margin-bottom: 10px;
  font-size: 26px;
  text-align: right;
}
.footer-right p {
  text-align: right;
  margin-bottom: 10px;
  font-size: 22px;
}

footer p {
  font-size: 22px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px solid #6E2753;
  padding-top: 10px;
  font-size: 14px;
}

.w {
  color: #6E2753;
  font-weight: bold;
  font-size: 24px;
}

.footer-links a {
  color: #6E2753;
  text-decoration: none;
  margin: 0 5px;
  font-size: 16px;
}

.footer-links a:hover {
  text-decoration: underline;
}
/* 🔽 Responsive Footer (Phones & Tablets) */
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 20px; /* smaller gap */
    margin-bottom: 20px; /* reduced bottom margin */
    text-align: center; /* Center-align content */
  }

  .footer-left,
  .footer-center,
  .footer-right {
    margin-bottom: 0 !important; /* ❌ stop stacking extra spacing */
  }

  .newsletter-container {
    justify-content: center;
    padding: 10px 0;
    margin-bottom: 20px; /* cap bottom space */
  }

  .newsletter-form {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px; /* reduced */
    width: 100%;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
    min-width: auto;
  }

  .footer-right h4 {
    font-size: 20px;
    margin-bottom: 10px; /* keep it tight */
  }

  .footer-right p,
  footer p {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .w {
    font-size: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 10px; /* limit space */
    text-align: center;
    font-size: 13px;
    margin-top: 20px; /* prevent huge space */
  }
  .footer-center{
    margin-top: 0;
  }

}
@media (max-width: 768px) {
  .footer-left,
  .footer-center,
  .footer-right {
    flex: 1 1 100%; /* take full width */
    max-width: 100%; /* no forced width */
  }
}

/* --- General Sidebar Styling --- */
.course-sidebar {
    /* Ensures the sidebar is clearly defined */
    width: 350px; /* Adjust as necessary for your page layout */
    padding: 20px;
    background-color: #fff; /* White background */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Set text alignment to RTL */
    text-align: right; 
    direction: rtl;
}

.course-info-card {
  font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}

/* --- Titles and Subtitles --- */
.course-info-card h2 {
    color: #8D4B71; /* Dark Red, matching the image's heading color */
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    font-weight: bold;
}

.course-subtitle {
    color: #5C8161;
    font-size: 1.2rem;
    margin-bottom: 15px;
    margin-left: -10px;
}

/* --- Rating Section --- */
.course-rating {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align right for RTL */
    margin-bottom: 20px;
}

.course-rating .stars {
    color: #ffc107; /* Gold/Yellow color for stars */
    font-size: 1.1rem;
    margin-left: 5px; /* Space between stars and rating text */
}

.course-rating .rating-text {
    color: #8D4B71;
    font-size: 0.95rem;
}

/* --- Feature List (Icons and Text) --- */
.course-features {
    list-style: none; /* Remove default bullet points */
    padding: 0;
    margin: 15px 0;
    width: 300px  ;
     font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
}

.course-features li {
      font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #333;
    font-size: 1.1rem;
}

/* Placeholder for Icon Styling (Using Unicode/Font Awesome if available) */
/* If you use Font Awesome, replace the content property with the correct icon class */
.course-features li i {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px; /* Space between icon and text */
    font-size: 1.2rem;
    color: #8a2be2; /* Purple color for icons */
    /* Example: Using a placeholder Unicode character for the icon (requires specific font) */
}

/* A simple way to represent the icons without a library (less ideal) */
.icon-videos{
  margin-left: 12px;
}

/* --- Separator Lines (HR) --- */
hr {
    border: none;
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

/* --- Section Headings (H3) --- */
.course-section h3 {
    color: #8D4B71; /* Dark Red */
    font-size: 28px;
    margin: 0 0 15px 0;
     font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0; /* Light line under the heading */
}

/* --- Description Paragraphs --- */
.course-section p {
    line-height: 1.8;
     font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
    color: #333;
    margin-bottom: 15px;
}

/* --- Learning Outcomes List --- */
.learning-outcomes {
    padding-right: 25px; /* Adjust padding for numbered list in RTL */
    margin: 0;
    color: #333;
    line-height: 1.8;
    min-width: 300px;
    font-size: 1rem;
}

.learning-outcomes li {
    margin-bottom: 8px;
    /* Use a better number style if desired */
}

.show-more-list-btn {
    /* Basic button styling */
    background: none;
    border: none;
    color: #a38db4; /* Use a color that matches your scheme (purple-btn) */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    padding: 0;
    text-decoration: underline;
    display: block; /* Make it take up full width for proper alignment */
    text-align: right; /* Align to the right for RTL */
}

.show-more-list-btn:hover {
    color: #9c5f78; /* Hover color */
}
/* --- Purchase Section --- */
.course-purchase-section {
    padding-top: 20px;
    text-align: center; /* Center price and button */
}

.course-purchase-section .price {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    margin: 0 0 15px 0;
}

/* --- Buy Button --- */
.buy-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    background-color: #56795B; /* The distinctive green color */
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.buy-btn:hover {
    background-color: #5d975b; /* Slightly darker green on hover */
}

/* --- Purchased Message --- */
.purchased-msg {
    color: #1e8449; /* Green for success message */
    font-weight: bold;
    padding: 10px;
    border: 1px dashed #a3e4d7;
    border-radius: 5px;
}


.button-container {
  display: flex;
  gap: 30px;
  direction: rtl;
  margin-top: 20px;
  flex-wrap: wrap; 
  justify-content: center;
}

.btn {
  padding: 5px 10px;
  font-size: 27px;
  font-weight: bold;
  font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 160px;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Specific Button Colors remain unchanged */
.green-btn { background-color: #6a9c72; }
.purple-btn { background-color: #a38db4; }
.maroon-btn { background-color: #9c5f78; }

/* 🟩 Responsive Scaling */

/* Tablets and small laptops */
@media (max-width: 992px) {
  .btn {
    font-size: 22px;
    padding: 6px 8px;
    min-width: 130px;
  }
  .button-container {
    gap: 20px;
  }
}

/* Mobile landscape */
@media (max-width: 768px) {
  .btn {
    font-size: 17px; /* Decreased font size */
    padding: 4px 8px; /* Reduced padding */
    min-width: 100px; /* Reduced minimum width */
  }
  .button-container {
    gap: 10px; /* Reduced gap */
  }
  .lesson-video {
    width: 100%;
    min-height: 300px !important;
    border-radius: 16px;
    margin-bottom: 15px;
    margin: 0 auto;
  }
}

/* Mobile portrait (phones) */
@media (max-width: 480px) {
  .button-container {
    /* Set flex-direction to row (or remove override) to keep them horizontal */
    flex-direction: row; 
    gap: 8px; /* Very small gap */
    align-items: center;
    flex-wrap: wrap; /* Ensure they can wrap if needed, though they should fit now */
    min-width: 320px; /* Ensure enough width for buttons */
  }
  .btn {
    font-size: 14px; /* Significantly smaller font */
    padding: 4px 6px; /* Minimal padding */
    min-width: unset; /* Remove min-width to let content dictate size */
    width: auto; /* Ensure they don't take full width */
    white-space: nowrap; /* Prevent text from wrapping inside the button */
    border-radius: 10px; /* Slightly smaller border-radius */
  }
  .lesson-video {
    width: 100%;
    min-height: 300px !important;
    border-radius: 16px;
    margin-bottom: 15px;
    margin: 0 auto;
  }
}

.show-more-wrapper {
  text-align: center;
  margin-top: 20px;
}

.show-more-btn {
  background: linear-gradient(135deg, #56795B, #69956F);
  color: #fff;
  border: none;
  font-size: 18px;
  padding: 10px 25px;
  border-radius: 8px;
        font-family: "Tajawal", "Cairo", Arial, sans-serif !important;
  cursor: pointer;
  transition: background 0.3s ease;
}

.show-more-btn:hover {
  background-color: #5b1f45;
}

/* ===== Modal Styles ===== */
.reviews-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.reviews-modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 800px;
  position: relative;
  margin: 50px auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.close-modal {
  position: absolute;
  top: 15px;
  left: 20px;

  font-size: 28px;
  border: none;
  background: none;
  color: #6E2753;
  cursor: pointer;
  font-weight: bold;
}

.close-modal:hover {
  color: #4a1b3d;
}

.full-list {

  justify-content: flex-start;
}

/* Desktop layout stays same */

/* Desktop */
/* courses.css */

/* Desktop Layout (e.g., Grid or Flex with default order) */


/* Mobile Layout (CSS Reordering) */
@media (max-width: 800px) {
.course-container {
    display: grid;
    /* or display: flex; */
    /* ... other desktop styles ... */
}
}
@media (max-width: 768px) {
    .course-container {
        display: flex;
        flex-direction: column; /* Stacks items vertically */
    }

    /* Your desired mobile order (This is what determines the flow) */
    .course-main {
        order: 1; /* Video/Buttons/Lesson Title */
    }

    .course-sidebar {
        order: 2; /* Sidebar/Course Info */
    }

    .lesson-list {
        order: 3; /* Lessons */
    }

    .reviews-section {
        order: 4; /* Reviews */
    }
}