/* صفحه قوانین */
.terms-main {
    padding: 120px 2rem 4rem;
    min-height: 100vh;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
}

/* هدر */
.terms-header {
    text-align: center;
    margin-bottom: 3rem;
}

.terms-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.terms-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.terms-header p {
    color: var(--gray);
    font-size: 1rem;
}

/* فهرست مطالب */
.terms-toc {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-light);
}

.terms-toc h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-toc ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.terms-toc li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.terms-toc li a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* محتوا */
.terms-content {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.terms-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
}

.terms-section:last-of-type {
    border-bottom: none;
}

.terms-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-desc {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* آیتم‌های قانون */
.rule-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 1.2rem;
    background: var(--light);
    border-radius: 14px;
    border-right: 4px solid var(--primary);
    transition: all 0.3s;
}

.rule-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.rule-item.success {
    border-right-color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

.rule-item.warning {
    border-right-color: var(--secondary);
    background: rgba(245, 158, 11, 0.08);
}

.rule-item.danger {
    border-right-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.rule-number {
    min-width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.rule-item.success .rule-number {
    background: var(--success);
}

.rule-item.warning .rule-number {
    background: var(--secondary);
}

.rule-item.danger .rule-number {
    background: #ef4444;
}

.rule-content {
    flex: 1;
}

.rule-content p {
    color: var(--dark-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

.rule-content ul {
    margin-top: 0.8rem;
    padding-right: 1.5rem;
}

.rule-content li {
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.rule-content strong {
    color: var(--dark);
}

.rule-content a {
    color: var(--primary);
    text-decoration: none;
}

.rule-content a:hover {
    text-decoration: underline;
}

/* شبکه مجازات‌ها */
.punishment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.punishment-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 12px;
    transition: all 0.3s;
}

.punishment-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.punishment-item.warning {
    background: rgba(245, 158, 11, 0.1);
}

.punishment-item.danger {
    background: rgba(239, 68, 68, 0.1);
}

.punish-number {
    min-width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.punishment-item.warning .punish-number {
    background: var(--secondary);
}

.punishment-item.danger .punish-number {
    background: #ef4444;
}

.punishment-item p {
    color: var(--dark-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* فوتر قوانین */
.terms-footer {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
    border-radius: 16px;
    margin-bottom: 2rem;
}

.terms-footer p {
    color: var(--dark);
    font-weight: 600;
}

.terms-footer p:first-child {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* دکمه‌های اقدام */
.terms-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.terms-actions .btn-primary,
.terms-actions .btn-secondary {
    padding: 1rem 2rem;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .terms-main {
        padding: 100px 1rem 2rem;
    }
    
    .terms-header h1 {
        font-size: 1.8rem;
    }
    
    .terms-content {
        padding: 1.5rem;
    }
    
    .terms-toc ul {
        grid-template-columns: 1fr;
    }
    
    .terms-section h2 {
        font-size: 1.3rem;
    }
    
    .rule-item {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .punishment-grid {
        grid-template-columns: 1fr;
    }
    
    .terms-actions {
        flex-direction: column;
    }
    
    .terms-actions a {
        width: 100%;
        justify-content: center;
    }
}