/* استایل‌های کلی قالب و دکمه‌ها */
.ecm-container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: inherit;
    direction: rtl;
}

/* پنل فیلتر هوشمند */
.ecm-filter-panel {
    background: #fbf9ff;
    border: 1px solid #e2d9f3;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 30px;
}

.ecm-filter-panel input, .ecm-filter-panel select {
    padding: 10px;
    border: 1px solid #dcd3ee;
    border-radius: 8px;
    background: #fff;
    flex: 1;
    min-width: 180px;
}

.ecm-btn-accent {
    background-color: #8c52ff;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.ecm-btn-accent:hover {
    background-color: #713cd5;
    box-shadow: 0 4px 10px rgba(140, 82, 255, 0.3);
}

/* گرید دوره‌ها */
.ecm-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.ecm-course-card {
    background: #ffffff;
    border: 1px solid #f0ecfa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.ecm-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(140, 82, 255, 0.1);
}

.ecm-course-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ecm-course-details {
    padding: 15px;
}

.ecm-course-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #333;
}

.ecm-meta {
    font-size: 0.85rem;
    color: #666;
    margin: 5px 0;
}

.ecm-stars-display {
    color: #d4af37; /* طلایی */
    font-weight: bold;
    margin: 10px 0;
    font-size: 0.9rem;
}

.ecm-price {
    font-size: 1.15rem;
    font-weight: bold;
    color: #8c52ff;
    margin-bottom: 15px;
}

.ecm-btn-register, .ecm-btn-rate {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-top: 5px;
    transition: 0.3s;
}

.ecm-btn-register {
    background: #8c52ff;
    color: #fff;
}

.ecm-btn-register:hover {
    background: #713cd5;
}

.ecm-btn-rate {
    background: #f1ecfe;
    color: #8c52ff;
}

.ecm-btn-rate:hover {
    background: #e2d9f3;
}

/* استایل جدول گرافیکی دوره‌ها */
.ecm-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.ecm-custom-table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f0ecfa;
}

.ecm-custom-table th, .ecm-custom-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #f0ecfa;
}

.ecm-custom-table th {
    background-color: #8c52ff;
    color: white;
    font-weight: bold;
}

.ecm-custom-table tr:hover {
    background-color: #faf8ff;
}

.table-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.table-price {
    color: #8c52ff;
    font-weight: bold;
}

.table-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* مدال‌ها و سیستم بازشو */
.ecm-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ecm-modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    position: relative;
    direction: rtl;
}

.ecm-modal-close {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

/* استایل سیستم ستاره‌ها در فرم امتیازدهی */
.ecm-stars-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    font-size: 2.2rem;
    margin: 15px 0;
}

.ecm-stars-rating .star {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}

.ecm-stars-rating .star:hover,
.ecm-stars-rating .star:hover ~ .star,
.ecm-stars-rating .star.active,
.ecm-stars-rating .star.active ~ .star {
    color: #d4af37; /* رنگ طلایی */
}

.ecm-custom-table th,.ecm-custom-table td{white-space:normal;vertical-align:middle;}
.ecm-review-item{padding:12px 0;border-bottom:1px solid #eee}.ecm-review-head{display:flex;justify-content:space-between;gap:10px}.ecm-review-stars{color:#d99b00;margin:5px 0}.ecm-error{color:#b42318}.ecm-loading{text-align:center}@media(max-width:700px){.ecm-custom-table{min-width:760px}.ecm-table-container{-webkit-overflow-scrolling:touch}.ecm-modal-content{max-height:90vh;overflow:auto;width:calc(100% - 24px);padding:18px}.ecm-review-head{flex-direction:column;gap:3px}}
