:root {
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --success: #10b981;
    --bg-light: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.2);
}

html { direction: rtl; }
body {
    background: linear-gradient(135deg, #6b46c1 0%, #805ad5 25%, #d53f8c 50%, #ed64a6 75%, #fbb6ce 100%);
    color: #1f2937;
    font-family: 'IRANSans', 'Vazirmatn', Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #5d26c1 100%);
    color: white;
    padding: 70px 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    box-shadow: var(--card-shadow);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}
.hero-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.95rem;
    opacity: 0.9;
    flex-wrap: wrap;
}
.hero-meta span { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 25px;
    padding: 35px;
    text-align: center;
    margin-top: 35px;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-box .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.cta-box .btn:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.main-wrapper {
    max-width: 1200px;
    margin: -30px auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.content-card {
    background: white;
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 25px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.section-title i { font-size: 1.3rem; }

.img-round {
    width: 250px;
    height: 250px;
    border-radius: 25%;
    overflow: hidden;
    margin: 0 auto 30px;
    border: 4px solid rgb(230, 86, 230);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.img-round:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4);
}
.img-round img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    display: block;
}

.desc-list, .obj-list, .syllabus-list {
    list-style: none;
    padding: 0;
}
.desc-list li,
.obj-list li,
.syllabus-list li {
    position: relative;
    padding-right: 32px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text);
    transition: color 0.2s;
    line-height: 1.7;
}
.desc-list li:hover { color: var(--primary); }

.obj-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 2px;
    color: var(--success);
    font-size: 1.1rem;
}

.syllabus-list li::before {
    content: '\f138';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 2px;
    color: var(--primary);
    font-size: 1.1rem;
}
.syllabus-list li:not(:last-child) {
    border-bottom: 1px dashed var(--border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.related-box {
    background: white;
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    height: fit-content;
    animation: fadeIn 0.7s ease-out;
    position: sticky;
    top: 20px;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.related-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    border-radius: 16px;
    transition: all 0.25s ease;
    background: #fafbff;
    margin-bottom: 10px;
}
.related-item:hover {
    background: rgba(124, 58, 237, 0.06);
    transform: translateX(4px);
    text-decoration: none;
    color: var(--text);
}
.related-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-info small {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
}
.related-info h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.4;
}

.empty-related {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 20px;
}

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 15px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    border: 2px solid transparent;
}
.floating-btn:hover {
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
    color: white;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.3);
}
.floating-btn i {
    font-size: 1.2rem;
}

.img-round:has(img[src=""])::before,
.related-thumb:has(img[src=""])::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    color: #cbd5e1;
    font-size: 2rem;
}