/* استایل‌های سفارشی برای افزونه جزوه‌های درسی - طراحی مشابه افزونه نمونه سوال امتحانی */
:root {
    --primary: #2563EB; /* آبی روشن‌تر */
    --primary-dark: #1E40AF; /* آبی تیره‌تر */
    --secondary: #0EA5E9; /* آبی فیروزه‌ای */
    --accent: #F59E0B; /* کهربایی */
    --accent-light: #FBBF24; /* کهربایی روشن‌تر */
    --background: #F0F9FF; /* پس‌زمینه روشن‌تر */
    --card-bg: rgba(255, 255, 255, 0.95); /* افکت شیشه‌ای بهبود یافته */
    --text: #0F172A; /* خاکستری تیره‌تر */
    --text-light: #64748B; /* خاکستری روشن‌تر */
    --white: #FFFFFF;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-hover: linear-gradient(135deg, var(--primary-dark), var(--primary));
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* رنگ‌های شفاف برای کادرهای جزوه‌ها */
    --card-border-1: rgba(37, 99, 235, 0.5); /* آبی شفاف */
    --card-border-2: rgba(14, 165, 233, 0.5); /* فیروزه‌ای شفاف */
    --card-border-3: rgba(245, 158, 11, 0.5); /* کهربایی شفاف */
    --card-border-4: rgba(139, 92, 246, 0.5); /* بنفش شفاف */
    --card-border-5: rgba(16, 185, 129, 0.5); /* سبز شفاف */
}

/* استایل‌های عمومی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 400;
    width: 100%;
    min-height: 100vh;
}

/* حذف فوتر */
.study-notes-container footer {
    display: none !important;
}

/* تنظیمات اضافی برای محتوای اصلی */
.study-notes-container {
    padding: 2rem 0;
    background: var(--background);
    width: 100%;
    max-width: 100%;
    display: block !important; /* اضافه شده برای اطمینان از نمایش در موبایل */
    visibility: visible !important; /* اضافه شده برای اطمینان از نمایش در موبایل */
    opacity: 1 !important; /* اضافه شده برای اطمینان از نمایش در موبایل */
}

.study-notes-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.study-notes-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* اصلاح مشکل نمایش در موبایل */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 14px;
}

/* اصلاح مشکل نمایش متن "انتخاب کنید" در کادرهای انتخاب */
.filter-item select {
    width: 100%;
    padding: 0.8rem 1rem; /* افزایش پدینگ افقی */
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--white);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px; /* تنظیم اندازه فونت */
    height: auto; /* حذف ارتفاع ثابت */
    min-height: 42px; /* تنظیم حداقل ارتفاع */
    text-overflow: ellipsis; /* اضافه کردن نقطه‌چین برای متن‌های طولانی */
    white-space: nowrap; /* جلوگیری از شکست خط */
    -webkit-appearance: menulist; /* بازگرداندن ظاهر پیش‌فرض در مرورگرهای مبتنی بر WebKit */
    -moz-appearance: menulist; /* بازگرداندن ظاهر پیش‌فرض در Firefox */
    appearance: menulist; /* بازگرداندن ظاهر پیش‌فرض */
    direction: rtl; /* اطمینان از جهت راست به چپ */
    text-align: right; /* اطمینان از چینش متن از راست */
}

/* اصلاح نمایش متن placeholder در select */
.filter-item select option {
    font-size: 14px;
    padding: 8px;
    direction: rtl;
    text-align: right;
}

/* استایل برای چک‌باکس‌ها */
.filter-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.filter-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-checkbox-group input[type="checkbox"],
.filter-checkbox-group input[type="radio"] {
    margin-left: 0;
    margin-right: 0.5rem;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox-group label {
    display: inline-block;
    margin-bottom: 0;
    cursor: pointer;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 500;
}

.filter-submit {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.search-button {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--primary);
    color: var(--white);
    font-size: 14px;
}

.search-button:hover {
    background-color: var(--primary-dark);
}

.reset-button {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--text-light);
    color: var(--white);
    font-size: 14px;
}

.reset-button:hover {
    background-color: var(--text);
}

.study-notes-results {
    min-height: 200px;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

#study-notes-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* استایل‌های جدید برای نمایش جزوه‌ها به صورت مستطیلی و افقی */
.study-notes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.study-note-item {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 160px;
    padding: 1.5rem;
    cursor: pointer;
    border: 3px solid transparent;
}

/* اعمال رنگ‌های متفاوت برای حاشیه کارت‌ها */
.study-note-item:nth-child(5n+1) {
    border-color: var(--card-border-1);
}

.study-note-item:nth-child(5n+2) {
    border-color: var(--card-border-2);
}

.study-note-item:nth-child(5n+3) {
    border-color: var(--card-border-3);
}

.study-note-item:nth-child(5n+4) {
    border-color: var(--card-border-4);
}

.study-note-item:nth-child(5n+5) {
    border-color: var(--card-border-5);
}

.study-note-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.note-header {
    margin-bottom: 1rem;
}

.note-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* تغییر نمایش اطلاعات جزوه به صورت افقی */
.note-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.meta-label {
    font-weight: 600;
    color: var(--text);
}

.meta-value {
    color: var(--text-light);
}

.note-description {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.note-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-label {
    font-weight: 500;
}

.note-format {
    background-color: rgba(245, 158, 11, 0.2);
    color: #B45309;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.note-format.pdf {
    background-color: rgba(239, 68, 68, 0.2);
    color: #B91C1C;
}

.note-format.doc, .note-format.docx {
    background-color: rgba(37, 99, 235, 0.2);
    color: #1E40AF;
}

.note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.note-buttons {
    display: flex;
    gap: 1rem;
}

.view-note {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.view-note:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
    color: var(--white);
}

.download-note {
    background-color: var(--accent);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.download-note:hover {
    background-color: var(--accent-light);
    text-decoration: none;
    color: var(--white);
}

.study-notes-count {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.study-notes-count p {
    color: var(--text);
}

.study-notes-count p span {
    color: var(--primary);
    font-weight: 700;
}

.study-notes-message {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
}

/* استایل‌های پاسخگو */
@media (max-width: 768px) {
    .study-notes-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-item {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .note-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .meta-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .study-notes-title {
        font-size: 1.8rem;
    }
    
    .filter-extra {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-checkbox-group {
        margin-bottom: 0.5rem;
    }
    
    .filter-submit {
        flex-direction: column;
        width: 100%;
    }
    
    .search-button, .reset-button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .note-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .note-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .note-buttons {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-note, .download-note {
        width: 100%;
        text-align: center;
        display: block;
    }
}

