/* 
 * Subpages Header Styles
 * استایل‌های اختصاصی برای صفحات زیرمجموعه (Blog, Exam, etc.)
 */

/* ==================== Header Adjustments for Subpages ==================== */
body {
    padding-top: 80px !important;
    background: #f8f9fa !important;
}

header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1) !important;
}

/* ==================== Page Title Section ==================== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0 40px;
    margin-top: 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 50px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 600px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== Content Sections ==================== */
.content-section {
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Cards Enhancement ==================== */
.card-enhanced {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

/* ==================== Buttons Enhancement ==================== */
.btn-enhanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

.btn-enhanced:active {
    transform: translateY(0);
}

.btn-outline-enhanced {
    background: transparent;
    color: #667eea !important;
    border: 2px solid #667eea;
    box-shadow: none;
}

.btn-outline-enhanced:hover {
    background: #667eea;
    color: white !important;
}

/* ==================== Grid Layouts ==================== */
.grid-enhanced {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==================== Loading States ==================== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Empty States ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 25px;
}

/* ==================== Alerts ==================== */
.alert-enhanced {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-right: 4px solid #27ae60;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    border-right: 4px solid #2980b9;
}

.alert-warning {
    background: rgba(241, 196, 15, 0.1);
    color: #f39c12;
    border-right: 4px solid #f39c12;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border-right: 4px solid #c0392b;
}

/* ==================== Badges ==================== */
.badge-enhanced {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.badge-success {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.badge-warning {
    background: rgba(241, 196, 15, 0.15);
    color: #f39c12;
}

.badge-danger {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

/* ==================== Dark Mode Support ==================== */
body.darkmode {
    background: #1a1a2e !important;
}

body.darkmode header {
    background: rgba(26, 26, 46, 0.98) !important;
    border-bottom-color: rgba(102, 126, 234, 0.2) !important;
}

body.darkmode .page-header {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

body.darkmode .card-enhanced {
    background: #16213e;
    border-color: rgba(255, 255, 255, 0.1);
}

body.darkmode .empty-state {
    background: #16213e;
}

body.darkmode .empty-state h3 {
    color: rgba(255, 255, 255, 0.9);
}

body.darkmode .empty-state p {
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    body {
        padding-top: 70px !important;
    }
    
    .page-header {
        padding: 40px 0 30px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .content-section {
        padding: 30px 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .card-enhanced {
        padding: 20px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    header,
    .page-header,
    .btn-enhanced {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
        background: white !important;
    }
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== Utilities ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
.p-40 { padding: 40px; }
