/* ============================================
   BLOGS.CSS - Staffing Maker Blog System
   ============================================ */

/* ===== GLOBAL BLOG STYLES ===== */
.blog-main-wrapper {
    background: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* ===== BLOG HERO SECTION ===== */
.blog-hero {
    background: linear-gradient(135deg, #010e46 0%, #26024b 100%);
    padding: 3rem 0 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-hero::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.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.blog-hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-hero-desc {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTON STYLES ===== */
.btn-blog-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-blog-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-blog-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-blog-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-blog-outline {
    background: transparent;
    color: #667eea;
    border: 1px solid #e0e0e0;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-blog-outline:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* ===== BLOG CONTAINER ===== */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.mobile-filters {
    margin: 0 0 1rem;
    padding: 0 0.5rem;
}

.mobile-filters .sidebar-widget {
    margin-bottom: 0.75rem;
}

/* ===== SIDEBAR STYLES ===== */
.blog-sidebar {
    padding-right: 1rem;
}

.sidebar-sticky {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
}

.widget-title i {
    color: #667eea;
    font-size: 1.1rem;
}

.category-dropdown-toggle {
    border: none;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
}

.category-dropdown-toggle:hover {
    background: #e3e7ff;
}

.category-dropdown-toggle i {
    font-size: 0.8rem;
}

/* Search Box */
.blog-search-box {
    position: relative;
    display: flex;
}

.blog-search-box input {
    flex: 1;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.blog-search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.blog-search-box .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.blog-search-box .search-btn:hover {
    color: #764ba2;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.category-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.category-item i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.category-count {
    background: rgba(255,255,255,0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-item.active .category-count {
    background: rgba(255,255,255,0.3);
}

/* Recent Blogs List */
.recent-blogs-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.recent-blog-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.6rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    color: inherit;
    text-decoration: none;
}

.recent-blog-item:hover {
    background: #f8f9fa;
    border-color: #e8e8e8;
    color: inherit;
    text-decoration: none;
}

.recent-blog-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-blog-info {
    flex: 1;
    min-width: 0;
}

.recent-blog-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.recent-blog-date {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.4rem 0.8rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ===== BLOG FEED AREA ===== */
.blog-feed-area {
    padding-left: 1rem;
}

/* Active Filters */
.active-filters {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e9ecef;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.filter-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    font-size: 0.9rem;
}

.btn-clear-filters {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    background: #c82333;
}

/* Blog Stats */
.blog-stats {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.stat-item i {
    color: #667eea;
    font-size: 1.1rem;
}

.stat-item strong {
    color: #667eea;
    font-size: 1.1rem;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: #e0e0e0;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.sort-dropdown label {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    white-space: nowrap;
}

.sort-dropdown select {
    padding: 0.4rem 1.6rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.95);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
    backdrop-filter: blur(5px);
}

.blog-card-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.blog-card-status.published {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.blog-card-status.pending {
    background: rgba(255, 193, 7, 0.9);
    color: #333;
}

.blog-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: #999;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.blog-card-author i {
    color: #667eea;
}

.blog-card-read-more {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-card-read-more:hover {
    transform: translateX(3px);
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #999;
    margin-bottom: 1.5rem;
}

/* ===== PAGINATION ===== */
.blog-pagination {
    margin-top: 2rem;
}

.pagination {
    gap: 0.5rem;
}

.page-link {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #667eea;
    font-size: 1.2rem;
}

.loading-spinner i {
    margin-right: 0.5rem;
}

/* ===== MODAL STYLES ===== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.2rem 1.5rem;
    border: none;
}

.modal-header .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.5rem;
    
}

/* Admin Header Actions */
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-admin-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-admin-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== ADMIN DASHBOARD ===== */
.admin-container {
    display: flex;
    height: calc(110vh - 200px);
    gap: 0;
    background: #f8f9fa;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-menu-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    
    gap: 0.8rem;
    font-size: 0.95rem;
    color: #555;
    border-left: 3px solid transparent;
}

.admin-menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.admin-menu-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.admin-menu-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.admin-menu-item .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
}

/* Admin Content */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-tab h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tab h3 i {
    color: #667eea;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
}

.stat-info h4 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.stat-info p {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
}

/* Recent Activity */
.recent-activity {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.recent-activity h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.activity-item i {
    color: #667eea;
}

.activity-item .time {
    margin-left: auto;
    color: #999;
    font-size: 0.8rem;
}

/* ===== BLOG EDITOR FORM ===== */
.blog-editor-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.blog-editor-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.blog-editor-form .form-label i {
    color: #667eea;
}

.blog-editor-form .form-control,
.blog-editor-form .form-select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.blog-editor-form .form-control:focus,
.blog-editor-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.btn-add-category {
    background: transparent;
    border: 1px dashed #667eea;
    color: #667eea;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-category:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Image Preview */
.image-preview {
    margin-top: 1rem;
    display: none;
}

.image-preview.active {
    display: block;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview .remove-image {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Rich Text Editor */
.blog-editor {
    min-height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.blog-editor .ql-toolbar {
    border-radius: 8px 8px 0 0;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.blog-editor .ql-container {
    border-radius: 0 0 8px 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
}

.blog-editor .ql-editor {
    min-height: 350px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* ===== ADMIN TABLE ===== */
.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.table-controls .search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.table-controls .search-box input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.table-controls .search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.table-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.admin-table thead {
    background: #f8f9fa;
}

.admin-table th {
    padding: 0.8rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: #000000;
    border-bottom: 2px solid #e0e0e0;
}

.admin-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    color: black;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table .action-btn {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    
}

.admin-table .btn-edit {
    background: #17a2b8;
    color: white;
}

.admin-table .btn-edit:hover {
    background: #138496;
}

.admin-table .btn-delete {
    background: #dc3545;
    color: white;
}

.admin-table .btn-delete:hover {
    background: #c82333;
}

.admin-table .btn-approve {
    background: #28a745;
    color: white;
}

.admin-table .btn-approve:hover {
    background: #218838;
}

.admin-table .btn-view {
    background: #667eea;
    color: white;
}

.admin-table .btn-view:hover {
    background: #5568d3;
}

.admin-table .status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.5rem;
    font-weight: 600;
}

.admin-table .status-badge.published {
    background: #d4edda;
    color: #155724;
}

.admin-table .status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.admin-table .status-badge.draft {
    background: #e2e3e5;
    color: #383d41;
}

/* Admin Pagination */
.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.admin-pagination button {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.admin-pagination button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.admin-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== PENDING BLOGS LIST ===== */
.pending-blogs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pending-blog-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 2px solid #ffc107;
}

.pending-blog-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.pending-blog-header h4 {
    color: #333;
    font-size: 1.2rem;
    margin: 0;
}

.pending-blog-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.pending-blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pending-blog-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.pending-blog-actions {
    display: flex;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

/* ===== CATEGORY MANAGER ===== */
.category-manager {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.add-category-form,
.add-admin-form {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.add-category-form h5,
.add-admin-form h5,
.categories-list h5,
.admins-list h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.categories-list,
.admins-list {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ===== BLOG DETAIL MODAL ===== */
.blog-detail-content {
    padding: 2rem;
}

.blog-detail-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.blog-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.blog-detail-content p {
    line-height: 1.3;
    color: #555;
    margin-bottom: 0.5rem;
}

.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.blog-detail-content ul,
.blog-detail-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.blog-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.blog-detail-content table th,
.blog-detail-content table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
}

.blog-detail-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Blog detail standalone page */
.blog-detail-page .blog-detail-hero {
    padding: 2.5rem 0 1.5rem;
}

.blog-detail-page .blog-detail-hero.with-image {
    background-size: cover;
    background-position: center;
}

.blog-detail-container {
    max-width: 1300px;
    margin: -2rem auto 3rem;
    padding: 0 1rem;
}

.blog-detail-card {
    background: #fff;
    border-radius: 12px;
    margin-top: 40px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
}

.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-detail-meta i {
    color: #667eea;
}

.blog-detail-page .blog-detail-content {
    font-size: 0.95rem;
    margin-top: 20px;
    line-height: 1.7;
    color: #333;
    padding: 0;
}

.blog-detail-page .blog-detail-content h1,
.blog-detail-page .blog-detail-content h2,
.blog-detail-page .blog-detail-content h3,
.blog-detail-page .blog-detail-content h4,
.blog-detail-page .blog-detail-content h5,
.blog-detail-page .blog-detail-content h6 {
    margin-top: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.blog-detail-page .blog-detail-content p {
    margin-bottom: 0.5rem;
}

.blog-detail-page .blog-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.blog-detail-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    position: sticky;
    top: 20px;
}

.blog-detail-sidebar h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.blog-back-link:hover {
    color: #4c51bf;
    text-decoration: none;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.toast-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}



/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 992px) {
    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-sidebar {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .blog-feed-area {
        padding-left: 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .mobile-filters {
        padding: 0 0.25rem;
    }

    .admin-container {
        flex-direction: column;
        height: auto;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .admin-menu {
        display: flex;
        overflow-x: auto;
    }

    .admin-menu-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .admin-menu-item.active {
        border-left: none;
        border-bottom-color: #667eea;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-hero {
        padding: 2rem 0 1.5rem;
    }

    .blog-hero-title {
        font-size: 1.75rem;
    }

    .blog-hero-desc {
        font-size: 1rem;
    }

    .blog-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .blog-hero-actions button {
        width: 100%;
        justify-content: center;
    }

    .blog-container {
        padding: 1rem 0.5rem;
    }

    .blog-container > .row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .blog-feed-area {
        order: 1;
        padding-left: 0;
    }

    .blog-sidebar {
        order: 2;
    }

    .sidebar-sticky {
        position: static;
    }

    .blog-stats {
        gap: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .stat-divider {
        display: none;
    }

    .sort-dropdown {
        margin-left: 0;
        width: 100%;
    }

    .sort-dropdown select {
        flex: 1;
    }

    .blog-grid {
        gap: 1rem;
    }

    .blog-card-image {
        height: 180px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-info h4 {
        font-size: 1.5rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .blog-editor-form {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
        justify-content: center;
    }

    .blog-detail-container {
        margin: -1rem auto 2rem;
    }

    .blog-detail-card {
        padding: 1.1rem;
    }

    .table-controls {
        flex-direction: column;
    }

    .table-controls .search-box {
        min-width: 100%;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.6rem;
    }

    .scroll-top-btn {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .pending-blog-header {
        flex-direction: column;
        gap: 1rem;
    }

    .pending-blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pending-blog-actions {
        flex-direction: column;
    }

    .pending-blog-actions button {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .blog-hero-title {
        font-size: 1.5rem;
    }

    .blog-card-title {
        font-size: 1rem;
    }

    .blog-card-description {
        font-size: 0.85rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .admin-tab h3 {
        font-size: 1.2rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .blog-hero,
    .blog-sidebar,
    .blog-stats,
    .blog-pagination,
    .scroll-top-btn,
    .modal,
    header,
    footer {
        display: none !important;
    }

    .blog-grid {
        display: block;
    }

    .blog-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus States */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ===== UTILITY CLASSES ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999 !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.3s ease;
}

/* ===== END OF BLOGS.CSS ===== */
