/**
 * استایل ابزارهای آموزشی
 */

/* Container */
.lcm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* باکس پایه‌های فعال در داشبورد */
.lcm-active-grades-box {
    background: linear-gradient(135deg, #d1f2eb 0%, #a7e9d7 100%);
    border: 3px solid #00d4aa;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.2);
}

.lcm-grades-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.lcm-grades-icon {
    font-size: 1.5em;
}

.lcm-grades-header h3 {
    margin: 0;
    color: #00695c;
    font-size: 1.2em;
    font-weight: 600;
}

.lcm-grades-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lcm-grade-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #00695c;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.lcm-grade-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   آرشیو ابزارها
======================================== */

.lcm-archive-tools {
    padding: 40px 0;
}

.lcm-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.lcm-archive-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.lcm-archive-description {
    font-size: 1.1em;
    color: #7f8c8d;
}

/* فیلتر دسته‌بندی */
.lcm-tools-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: bold;
    color: #2c3e50;
}

.filter-item {
    padding: 8px 20px;
    background: #ecf0f1;
    border-radius: 20px;
    text-decoration: none;
    color: #34495e;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-item:hover {
    background: #3498db;
    color: white;
}

.filter-item.active {
    background: #3498db;
    color: white;
}

/* ========================================
   گرید ابزارها
======================================== */

.lcm-tools-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.lcm-grid-cols-1 { grid-template-columns: 1fr; }
.lcm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lcm-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.lcm-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .lcm-grid-cols-3,
    .lcm-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .lcm-tools-grid {
        grid-template-columns: 1fr !important;
    }
}

/* کارت ابزار */
.lcm-tool-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.lcm-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.lcm-tool-card-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.lcm-tool-card-icon {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.lcm-tool-card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lcm-tool-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #e8f4f8;
    color: #3498db;
    border-radius: 8px;
    font-size: 10px;
    margin-bottom: 8px;
    width: fit-content;
}

.lcm-tool-card-title {
    font-size: 1.1em;
    margin-bottom: 8px;
    color: #2c3e50;
}

.lcm-tool-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.lcm-tool-card-title a:hover {
    color: #3498db;
}

.lcm-tool-card-excerpt {
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
    font-size: 0.9em;
}

.lcm-btn-card {
    display: inline-block;
    padding: 8px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 0.9em;
}

.lcm-btn-card:hover {
    background: #2980b9;
    transform: translateX(-3px);
}

/* کارت قفل شده */
.lcm-tool-locked {
    opacity: 0.8;
    position: relative;
}

.lcm-tool-locked::after {
    content: '🔒';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    opacity: 0.5;
}

.lcm-tool-card-locked {
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
    font-weight: bold;
}

/* ========================================
   لیست ابزارها
======================================== */

.lcm-tools-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lcm-tool-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.lcm-tool-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.lcm-tool-icon {
    font-size: 50px;
    min-width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.lcm-tool-content {
    flex: 1;
}

.lcm-tool-title {
    font-size: 1.5em;
    margin-bottom: 8px;
}

.lcm-tool-title a {
    text-decoration: none;
    color: #2c3e50;
}

.lcm-tool-type {
    display: inline-block;
    padding: 4px 10px;
    background: #e8f4f8;
    color: #3498db;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}

.lcm-tool-excerpt {
    color: #7f8c8d;
    line-height: 1.6;
}

.lcm-tool-action {
    min-width: 150px;
}

.lcm-btn-tool {
    display: inline-block;
    padding: 12px 25px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s;
    text-align: center;
}

.lcm-btn-tool:hover {
    background: #2980b9;
    transform: translateX(-3px);
}

/* ========================================
   تک صفحه ابزار
======================================== */

.lcm-single-tool {
    padding: 0 0 60px 0;
}

.lcm-tool-hero {
    background: linear-gradient(135deg, #0d7c8f 0%, #17a2b8 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.lcm-tool-back {
    text-align: right;
    margin-bottom: 12px;
}

.lcm-tool-back a {
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lcm-tool-back a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lcm-tool-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.lcm-tool-hero-top {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-direction: row;
    width: 100%;
}

.lcm-tool-hero-icon {
    font-size: 24px;
    line-height: 1;
    margin: 0;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.lcm-tool-hero-title {
    font-size: 22px;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-block !important;
    vertical-align: middle;
}

.lcm-tool-hero-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 11px;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.lcm-tool-hero-excerpt {
    font-size: 13px;
    opacity: 0.95;
    max-width: 600px;
    margin: 6px auto 0;
    line-height: 1.4;
}

.lcm-tool-main {
    padding: 0 20px;
}

.lcm-tool-description {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.lcm-tool-wrapper {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ========================================
   پیام‌های دسترسی
======================================== */

.lcm-access-denied {
    background: white;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 500px;
    margin: 0 auto;
}

.lcm-access-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.lcm-access-denied h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #2c3e50;
}

.lcm-access-denied p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.lcm-btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s;
}

.lcm-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* خطا */
.lcm-tool-error,
.lcm-no-tools {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #856404;
}

/* ========================================
   داشبوردها
======================================== */

.lcm-dashboard-wrapper {
    padding: 20px 0;
}

.lcm-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.lcm-dashboard-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: white;
}

.lcm-dashboard-header p {
    font-size: 1.1em;
    opacity: 0.95;
    margin: 0;
}

/* تم آبی فیروزه‌ای تیره برای معلم */
.lcm-teacher-dashboard .lcm-dashboard-header {
    background: linear-gradient(135deg, #0d7c8f 0%, #17a2b8 100%);
}

.lcm-teacher-dashboard .lcm-tool-card-icon {
    background: linear-gradient(135deg, #0d7c8f 0%, #17a2b8 100%);
}

.lcm-teacher-dashboard .lcm-btn-card {
    background: #0d7c8f;
}

.lcm-teacher-dashboard .lcm-btn-card:hover {
    background: #095e6d;
}

.lcm-teacher-dashboard .lcm-tool-badge {
    background: #d4f1f4;
    color: #0d7c8f;
}

/* تم بنفش صورتی برای دانش‌آموز */
.lcm-student-dashboard .lcm-dashboard-header {
    background: linear-gradient(135deg, #a044ff 0%, #6a3093 100%);
}

.lcm-student-dashboard .lcm-tool-card-icon {
    background: linear-gradient(135deg, #a044ff 0%, #6a3093 100%);
}

.lcm-student-dashboard .lcm-btn-card {
    background: #a044ff;
}

.lcm-student-dashboard .lcm-btn-card:hover {
    background: #8533d9;
}

.lcm-student-dashboard .lcm-tool-badge {
    background: #f3e5ff;
    color: #a044ff;
}

/* ========================================
   تم‌های رنگی صفحات تک ابزار
======================================== */

/* تم آبی فیروزه‌ای تیره معلم */
.lcm-theme-teacher .lcm-tool-hero {
    background: linear-gradient(135deg, #0d7c8f 0%, #17a2b8 100%);
}

.lcm-theme-teacher .lcm-btn-primary {
    background: #0d7c8f;
}

.lcm-theme-teacher .lcm-btn-primary:hover {
    background: #095e6d;
    box-shadow: 0 4px 15px rgba(13, 124, 143, 0.3);
}

/* تم بنفش دانش‌آموز */
.lcm-theme-student .lcm-tool-hero {
    background: linear-gradient(135deg, #a044ff 0%, #6a3093 100%);
}

.lcm-theme-student .lcm-btn-primary {
    background: #a044ff;
}

.lcm-theme-student .lcm-btn-primary:hover {
    background: #8533d9;
    box-shadow: 0 4px 15px rgba(160, 68, 255, 0.3);
}

/* ========================================
   پیام اشتراک (مشترک با worksheet)
======================================== */

.lcm-subscription-message {
    max-width: 600px;
    margin: 60px auto;
    padding: 50px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.lcm-sub-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.lcm-subscription-message h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.lcm-sub-desc {
    font-size: 1.1em;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 30px;
}

.lcm-sub-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.lcm-btn-sub-primary {
    padding: 15px 35px;
    background: #0d7c8f;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s;
    display: inline-block;
}

.lcm-theme-student .lcm-btn-sub-primary {
    background: #a044ff;
}

.lcm-btn-sub-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 124, 143, 0.3);
}

.lcm-theme-student .lcm-btn-sub-primary:hover {
    box-shadow: 0 6px 20px rgba(160, 68, 255, 0.3);
}

.lcm-btn-sub-secondary {
    padding: 15px 35px;
    background: white;
    color: #0d7c8f;
    border: 2px solid #0d7c8f;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s;
    display: inline-block;
}

.lcm-theme-student .lcm-btn-sub-secondary {
    color: #a044ff;
    border-color: #a044ff;
}

.lcm-btn-sub-secondary:hover {
    background: #0d7c8f;
    color: white;
}

.lcm-theme-student .lcm-btn-sub-secondary:hover {
    background: #a044ff;
    color: white;
}

.lcm-sub-note {
    font-size: 0.95em;
    color: #95a5a6;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-right: 4px solid #0d7c8f;
}

.lcm-theme-student .lcm-sub-note {
    border-right-color: #a044ff;
}

/* پیام افقی عدم اشتراک در داشبورد */
.lcm-dashboard-no-subscription {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.lcm-no-sub-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.lcm-no-sub-icon {
    font-size: 60px;
    flex-shrink: 0;
}

.lcm-no-sub-text h3 {
    font-size: 1.4em;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.lcm-no-sub-text p {
    color: #7f8c8d;
    margin: 0;
    line-height: 1.5;
}

.lcm-no-sub-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.lcm-dashboard-hint {
    text-align: center;
    color: #95a5a6;
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.lcm-teacher-dashboard .lcm-dashboard-hint {
    border-right: 4px solid #0d7c8f;
}

.lcm-student-dashboard .lcm-dashboard-hint {
    border-right: 4px solid #a044ff;
}

@media (max-width: 768px) {
    .lcm-dashboard-no-subscription {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    
    .lcm-no-sub-content {
        flex-direction: column;
        text-align: center;
    }
    
    .lcm-no-sub-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .lcm-btn-sub-primary,
    .lcm-btn-sub-secondary {
        width: 100%;
    }
}

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

@media (max-width: 768px) {
    .lcm-tool-item {
        flex-direction: column;
        text-align: center;
    }
    
    .lcm-tool-hero {
        padding: 20px 15px;
    }
    
    .lcm-tool-hero-top {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .lcm-tool-hero-title {
        font-size: 18px;
        white-space: normal;
    }
    
    .lcm-tool-hero-icon {
        font-size: 22px;
    }
    
    .lcm-tool-hero-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .lcm-tool-hero-excerpt {
        font-size: 12px;
    }
    
    .lcm-tool-back a {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .lcm-tool-wrapper {
        padding: 20px;
    }
    
    .lcm-access-denied {
        padding: 40px 20px;
    }
}

