.commentbox {
  background-color: whitesmoke;
  width: 100%;
  border: 3px solid grey;
  padding: 20px;
  margin: 10px;
  float:right;
}
.commentboxavatar {
width: 100%;
height: 100%;
float: right;
}
.accordion {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  padding: 12px;
  width: 100%;
  border: none;
  text-align: right;
  outline: none;
  font-size: 10px;
  transition: 0.4s;
  border-radius: 2.5px;
}
.accordion:hover {
  background-color: #ccc;
}
.accordion:after {
  content: '\25E2';
  color: #777;
  font-weight: bold;
  float: left;
  margin-left: 5px;
}
.accordion.active:after,
.accordion.active:after {
  content: '\25E5';
}
.panel {
  padding: 0 10px;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}
.panel p{
  font-size: 10px;
  color: #444;
}
.panelcontent:hover{
  background-color: #eee;
  color: #777;
}
.imagecenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.border-bottom {
  border-bottom-color: #e9e5e5 !important;
}
table, th, td {
  border:1px solid white;
  text-align: center;
}
#course_content_2 {
    display: none;
}
#related_course_2 {
    display: none;
}
#course_content_2 { display:none; }
#related_course_2 { display:none; }
.theater-mode #course_content_1,
.theater-mode #related_course_1,
.theater-mode #course_file_comment_1 {
    display: none;
}
.theater-mode #course_content_2,
.theater-mode #related_course_2,
.theater-mode #course_file_comment_2 {
    display: block;
}
.container.theater-mode #videoCol {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
@media (max-width: 768px) {
    .theater-mode #course_content_1,
    #course_content_1 {
        display: block !important;
    }
    .theater-mode #course_content_2,
    #course_content_2 {
        display: none !important;
    }
    .theater-mode #related_course_1,
    #related_course_1 {
        display: block !important;
    }
    .theater-mode #related_course_2,
    #related_course_2 {
        display: none !important;
    }
    .theater-mode #course_file_comment_1,
    #course_file_comment_1 {
        display: none !important;
    }
    .theater-mode #course_file_comment_2,
    #course_file_comment_2 {
        display: block !important;
    }
    #theaterBtn {
        display: none !important;
    }
    #videoCol {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    font-size: 13px;
    text-align: right;
}
.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-size: 13px;
    text-align: right;
}
.success-msg,
.error-msg {
    margin-top: 10px;
    animation: fadeOut 4s ease 1 forwards;
}
@keyframes fadeOut {
    to { opacity: 0; }
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}




.header {
    position: relative;
    background-image: url('https://elimi.ir/images/1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1f2d3d;
}

/* لایه شفاف‌کننده فقط برای بک‌گراند */
.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75); 
    z-index: 0;
}

/* محتوا در لایه بالاتر */
.header-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;     /* عمودی وسط */
}

/* ستون چپ */
.left-box {
    text-align: center;
}

/* ستون راست: عمودی وسط + افقی وسط */
.right-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;               /* فاصله بین دکمه‌ها */
}

.profile-box {
    display: flex;
    justify-content: center;   /* افقی وسط */
    align-items: center;       /* عمودی وسط */
    gap: 10px;                 /* فاصله بین عکس و متن */
}

.profile-box p {
    margin: 0;
}

.profile-box img {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 4px solid #fff;   /* حاشیه سفید */
    box-shadow: 0 0 10px rgba(0,0,0,0.2); /* اختیاری: یه سایه ملایم شیک */
}


/* ----------- ریسپانسیو موبایل ----------- */
@media (max-width: 768px) {

    .header {
        min-height: auto;        /* ارتفاع اتوماتیک */
        padding: 30px 5px;
    }
    .header h1,
    .header p {
        font-size: 24px !important;
    }
    .header p {
        font-size: 14px !important;
    }
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .left-box, .right-box {
        width: 100%;
        margin-bottom: 15px;
    }
    .right-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .profile-box img {
        width: 60px;
        height: 60px;
    }
}

.course-content {
    display: flex;
    gap: 30px;
    direction: rtl;
    margin-top: 20px;
}

/* سایدبار */
.sidebar {
    width: 260px;
    background: #1f2d3d;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e3e3e3;
    height: fit-content;
    top: 20px;
    color: white;
    border-right: none;
    border-left: 1px solid #e3e3e3;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 12px;
}

.sidebar a {
    display: block;
    padding: 5px 5px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.sidebar a:hover {
    background: #ffffff;
    padding-right: 20px;
    color: #1f2d3d;
}

/* لینک فعال */
.sidebar a.active {
    background: #ffffff;
    padding-right: 20px;
    color: #1f2d3d;
}


/* دو سایدبار زیر هم */
.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 20px;      /* فاصله بین دو سایدبار */
    width: 260px;
}
/* گروه دو سایدبار */
.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

/* محتوای اصلی */
.main-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 15px 15px;
    border: 1px solid #1f2d3d;
    line-height: 2;
    color: #1f2d3d;
    text-align: justify;
}

.main-content h1 {
    margin-bottom: 20px;
    font-size: 28px!important;
}

.main-content h2 {
    margin-bottom: 20px;
    font-size: 24px!important;
}

.main-content h3 {
    margin-bottom: 20px;
    font-size: 21px!important;
}

.header-content h1 {
    margin-bottom: 20px;
    font-size: 28px!important;
}

.header-content a {
    color: #1f2d3d!important;
}

.header-content h2 {
    margin-bottom: 20px;
    font-size: 24px!important;
}
/* ریسپانسیو */
@media (max-width: 768px) {
    .header-content h1 {
        margin-bottom: 10px;
        font-size: 20px!important;
    }
    .header-content h2 {
        margin-bottom:10px;
        font-size: 17px!important;
    }
    .sidebar-group,
    .sidebar,
    .sidebar-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important; /* اختیاری ولی بهتره برای موبایل */
    }

    .course-content {
        flex-direction: column !important;
    }
}
#notEnrol{
  background-color: white;
  margin-top: 74px!important;
}




/* رپری که کارت‌ها را وسط صفحه نگه می‌دارد */
.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* ۲ تا در هر ردیف */
    gap: 20px;
    justify-content: center; /* وسط افقی */
    align-items: center;     /* وسط عمودی */
    width: 100%;
    max-width: 900px;        /* تا مرکز نگه داشته شود */
    margin: 0 auto;          /* وسط صفحه */
    direction: rtl;
}

/* خود کارت */
.course-card {
    background: #1f2d3d;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    width: 100%;
    padding: 14px 18px;
}

.course-img {
    height: 75px;
    width: 100px;
    border-radius: 10px;
    flex-shrink: 0;
}

.course-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

.course-info p {
    font-size: 12px;
    color: white;
    margin: 2px 0;
}
@media (max-width: 600px) {
    .courses-wrapper {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 10px;
    }
    .course-card {
        width: 100%;
        margin: 0 auto;
    }
    .course-info p {
        font-size: 14px;
    }
}
.course-content { align-items: flex-start; }
.enrol-help {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}
.related-course-title,.enrol-title {
    background: #1f2d3d;
    color: white;
    font-weight: bold;
    padding: 40px 0;
    margin: 0;
    width: 100%;
    font-size: 18px;
    text-align: center;
    border-radius: 10px;
}
.video-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 15px auto;
}
.video-wrapper video {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    border-radius: 10px;
    display: block;
}
.signup-card {
    background: #1f2d3d;
    color: white;
    padding: 22px;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-align: center;
}
.signup-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}
.signup-card p {
    margin-bottom: 15px;
    font-size: 14px;
}
.title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    line-height: 1.4em;
}