/* ===== ویجت سایدبار ===== */
.ctc-provinces-container {
    direction: rtl;
    font-family: 'IRANSans', Tahoma, Arial, sans-serif;
}

.ctc-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
}

.ctc-provinces-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ctc-provinces-list li {
    margin-bottom: 8px;
}

.ctc-provinces-list li a {
    display: block;
    padding: 12px 18px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fd 100%);
    color: #0073aa;
    text-decoration: none;
    border-radius: 8px;
    border-right: 4px solid #0073aa;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ctc-provinces-list li a:hover {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,115,170,0.3);
    border-right-color: #ff9800;
}

/* ===== مودال پاپ‌آپ ===== */
.ctc-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: ctcFadeIn 0.3s ease;
}

@keyframes ctcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ctc-modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 70%;
    max-width: 750px;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    animation: ctcSlideDown 0.3s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

@keyframes ctcSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ctc-modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.ctc-modal-title {
    font-size: 20px;
    font-weight: bold;
}

.ctc-modal-close {
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0 8px;
    color: #fff;
}

.ctc-modal-close:hover {
    transform: rotate(90deg);
    color: #ff9800;
}

.ctc-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* ===== لیست دوره‌ها در مودال ===== */
.ctc-courses-list {
    display: grid;
    gap: 15px;
}

.ctc-course-item {
    background: #fafafa;
    padding: 18px 20px;
    border-radius: 8px;
    border-bottom: 3px solid #e0e0e0;
    transition: all 0.3s ease;
}

.ctc-course-item:hover {
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-bottom-color: #0073aa;
}

.ctc-course-item h4 {
    margin: 0 0 12px 0;
    color: #222;
    font-size: 17px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.ctc-course-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    font-size: 14px;
    color: #555;
}

.ctc-course-details span {
    display: block;
    padding: 3px 0;
}

.ctc-course-details strong {
    color: #333;
    font-weight: 600;
}

/* ===== وضعیت‌های مختلف ===== */
.ctc-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.ctc-loading:after {
    content: '...';
    animation: ctcDots 1.5s steps(4, end) infinite;
}

@keyframes ctcDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

.ctc-error {
    color: #d32f2f;
    background: #ffebee;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.ctc-no-courses {
    color: #666;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 15px;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .ctc-modal-content {
        width: 92%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .ctc-course-details {
        grid-template-columns: 1fr;
    }
    
    .ctc-modal-header {
        padding: 15px 18px;
    }
    
    .ctc-modal-title {
        font-size: 17px;
    }
    
    .ctc-modal-body {
        padding: 15px;
    }
    
    .ctc-provinces-list li a {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .ctc-course-item {
        padding: 14px 16px;
    }
    
    .ctc-course-item h4 {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .ctc-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .ctc-modal-close {
        font-size: 28px;
    }
}