/* Desktop Layout */
.desktop-text,
.desktop-logo {
    display: block;
}

.mobile-text,
.mobile-logo {
    display: none;
}

/* Blog Index Page */
.blog-page-header {
    background: linear-gradient(135deg, #2e3972 0%, #39254e 100%);
    color: white;
    padding: 120px 0 60px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    z-index: 1;
}

.blog-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/bg/3.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.blog-page-header .container {
    position: relative;
    z-index: 2;
}

.blog-page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.blog-page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Search and Filters */
.blog-filters {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
}

.blog-filters .form-control,
.blog-filters .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blog-filters .form-control:focus,
.blog-filters .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.blog-filters .input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px 0 0 10px;
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f8f9fa;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-card .card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.blog-card .badge {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
    display: inline-block;
}

.blog-card .card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card .card-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card .card-title a:hover {
    color: #667eea;
}

.blog-card .card-text {
    color: #718096;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.blog-card .card-footer {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: auto;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #a0aec0;
}

.blog-meta i {
    margin-right: 5px;
    color: #667eea;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 2rem;
}

.blog-sidebar .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.blog-sidebar .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    font-weight: 600;
    font-size: 1.1rem;
}

.blog-sidebar .card-body {
    padding: 25px;
}

.blog-sidebar .list-group-item {
    border: none;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.blog-sidebar .list-group-item:last-child {
    border-bottom: none;
}

.blog-sidebar .list-group-item:hover {
    background: #f8fafc;
    padding-right: 10px;
}

.blog-sidebar .list-group-item a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-sidebar .list-group-item a:hover {
    color: #667eea;
}

/* Removed conflicting badge styles */

/* Blog Details Page */
.blog-details-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.blog-details-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/bg/3.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.blog-details-header .container {
    position: relative;
    z-index: 2;
}

.blog-breadcrumb {
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.blog-breadcrumb .breadcrumb {
    background: none;
    margin: 0;
    padding: 0;
}

.blog-breadcrumb .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.blog-breadcrumb .breadcrumb-item.active {
    color: white;
}

.blog-details-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #f1f5f9;
}

.blog-details-card .card-img-top {
    height: 400px;
    object-fit: cover;
}

.blog-details-card .card-body {
    padding: 40px;
}

.blog-details-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.blog-details-meta .badge {
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 25px;
}

.blog-details-meta small {
    color: #718096;
    font-size: 0.95rem;
}

.blog-details-meta i {
    margin-right: 8px;
    color: #667eea;
}

.blog-details-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 25px;
    color: #2d3748;
}

.blog-details-excerpt {
    font-size: 1.2rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 400;
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    color: #2d3748;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 20px;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 20px;
    padding-right: 20px;
}

.blog-content li {
    margin-bottom: 8px;
}

/* Comments Section */
.comments-section {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-top: 40px;
    border: 1px solid #f1f5f9;
}

.comments-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 25px 30px;
    font-weight: 600;
    font-size: 1.2rem;
}

.comments-section .card-body {
    padding: 30px;
}

.comment-item {
    padding: 25px 0;
    border-bottom: 1px solid #e2e8f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin-left: 20px;
    flex-shrink: 0;
}

.comment-content h6 {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.comment-content small {
    color: #718096;
    font-size: 0.9rem;
}

.comment-content p {
    margin-top: 15px;
    margin-bottom: 0;
    color: #4a5568;
    line-height: 1.6;
}

.comment-reply {
    margin-right: 40px;
    margin-top: 20px;
}

.comment-reply .comment-avatar {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    background: #718096;
}

/* Comment Form */
.comment-form {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-top: 30px;
    border: 1px solid #f1f5f9;
}

.comment-form .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 25px 30px;
    font-weight: 600;
    font-size: 1.2rem;
}

.comment-form .card-body {
    padding: 30px;
}

.comment-form .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.comment-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.comment-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comment-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Empty State */
.blog-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.blog-empty-state i {
    font-size: 4rem;
    margin-bottom: 30px;
    color: #cbd5e0;
}

.blog-empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a5568;
}

.blog-empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-page-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-details-title {
        font-size: 2rem;
    }
    
    .blog-filters {
        padding: 20px;
    }
    
    .blog-card .card-body {
        padding: 20px;
    }
    
    .blog-details-card .card-body {
        padding: 25px;
    }
    
    .comments-section .card-body,
    .comment-form .card-body {
        padding: 20px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card,
.blog-sidebar .card,
.comments-section,
.comment-form {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading State */
.blog-loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.blog-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Horizontal Blog Cards */
.blog-card-horizontal {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.08),
        0 3px 10px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background-clip: padding-box;
    height: 100%;
    position: relative;
}

.blog-card-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: -1;
    opacity: 0.8;
}

.blog-card-horizontal:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.15),
        0 8px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
}

.blog-card-horizontal:hover::before {
    background: linear-gradient(135deg, #ff6b6b 0%, #667eea 50%, #764ba2 100%);
}

.blog-image-horizontal {
    position: relative;
    overflow: hidden;
    height: 200px;
    border-radius: 0 18px 18px 0;
    margin: 2px;
}

.blog-image-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.05) contrast(1.1);
}

.blog-card-horizontal:hover .blog-image-horizontal img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.15) saturate(1.1);
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-content-horizontal {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.8) 100%);
    backdrop-filter: blur(10px);
}

.blog-content-horizontal h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-content-horizontal h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content-horizontal h3 a:hover {
    color: #667eea;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Removed old blog-meta-horizontal styles */

.meta-item-large {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.meta-item-large i {
    color: #667eea;
    width: 20px;
    font-size: 1.1rem;
}

.blog-bottom-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 15px;
}

.comments-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.comments-count i {
    color: #667eea;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:hover::before {
    left: 100%;
}

/* Responsive Design for Horizontal Cards */
@media (max-width: 768px) {
    /* Header Mobile Layout - Show/Hide Elements */
    .blog-page-header {
        padding: 80px 0 10px !important;
        z-index: 100 !important;
        margin-top: 0 !important;
    }
    
    /* Hide desktop elements in mobile */
    .desktop-text,
    .desktop-logo {
        display: none !important;
    }
    
    /* Show mobile elements */
    .mobile-text,
    .mobile-logo {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .mobile-text {
        margin-top: 20px;
    }
    
    .blog-page-header h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .blog-page-header p {
        font-size: 0.9rem;
    }
    
    .blog-page-header .col-lg-4 div {
        padding: 15px;
        margin: 0;
        display: inline-block;
        text-align: center;
    }
    
    .blog-page-header .col-lg-4 img {
        max-height: 60px;
        width: auto;
    }
    
    /* Blog Cards Mobile */
    .blog-image-horizontal {
        height: 150px;
        border-radius: 18px 18px 0 0;
    }
    
    .blog-content-horizontal {
        padding: 20px;
    }
    
    .blog-content-horizontal h3 {
        font-size: 1.2rem;
    }
    
    .meta-item-large {
        font-size: 0.9rem;
    }
    
    .blog-bottom-section {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .comments-count {
        font-size: 0.8rem;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .date-badge {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* Date Badge */
.date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    min-width: 80px;
    text-align: center;
}

.date-badge span {
    display: block;
    text-align: center;
    line-height: 1.2;
}

/* No Image Placeholder */
.blog-image-horizontal.no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    border: 2px dashed #dee2e6;
    position: relative;
}

.blog-image-horizontal.no-image::before {
    content: 'فاقد تصویر';
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #adb5bd;
}

/* Removed old search section styles - moved to sidebar */

/* Removed old search and filter styles - moved to sidebar */

.search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    padding: 2px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-box:focus-within::before {
    opacity: 1;
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.2rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 50px 10px 20px;
    font-size: 1rem;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-decoration {
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.search-box:focus-within .search-decoration {
    transform: scaleX(1);
}

/* Filters Styles */
.filters-row {
    display: flex;
    gap: 15px;
    height: 100%;
    align-items: center;
}

.filter-group {
    position: relative;
    flex: 1;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 12px 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.filter-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-group:focus-within::before {
    opacity: 1;
}

.filter-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.filter-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1rem;
    z-index: 2;
}

.filter-select {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 40px 8px 15px;
    font-size: 0.9rem;
    color: #333;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.filter-select option {
    background: #fff;
    color: #333;
    padding: 10px;
}

/* Mobile Responsive for Search */
@media (max-width: 768px) {
    .search-section {
        margin: 20px 0;
        padding: 20px 0;
    }
    
    .search-box {
        padding: 12px 15px;
        border-radius: 20px;
    }
    
    .search-icon {
        right: 15px;
        font-size: 1rem;
    }
    
    .search-input {
        padding: 8px 40px 8px 15px;
        font-size: 0.9rem;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .filter-group {
        padding: 10px 12px;
        border-radius: 15px;
    }
    
    .filter-icon {
        right: 12px;
        font-size: 0.9rem;
    }
    
    .filter-select {
        padding: 6px 35px 6px 12px;
        font-size: 0.85rem;
    }
    
    /* Sidebar Mobile */
    .blog-sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .blog-sidebar .card {
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .blog-sidebar .card-header {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .blog-sidebar .card-body {
        padding: 20px;
    }
    
    .blog-sidebar .list-group-item {
        padding: 0px 0;
    }
    
    .blog-sidebar .d-flex {
        padding: 3px 0;
    }
    
    .blog-sidebar .row {
        display: flex !important;
        align-items: center;
        padding: 8px !important;
    }
    
    .blog-sidebar .row .col-4 {
        width: 30% !important;
        margin-bottom: 0 !important;
    }
    
    .blog-sidebar .row .col-8 {
        width: 70% !important;
        margin-bottom: 0 !important;
    }
    
    .blog-sidebar .row .col-4 img,
    .blog-sidebar .row .col-4 .no-image {
        height: 50px !important;
    }
    
    .blog-sidebar .row .col-4 .no-image::before {
        font-size: 0.7rem !important;
    }
    
    .blog-sidebar .row .col-8 h6 {
        font-size: 0.8rem !important;
        margin-bottom: 3px !important;
    }
    
    .blog-sidebar .row .col-8 small {
        font-size: 0.7rem !important;
    }
    
    /* Categories Mobile Responsive */
    .blog-sidebar .form-check-input {
        width: 16px !important;
        height: 16px !important;
    }
    
    .blog-sidebar .form-check-label {
        font-size: 0.8rem !important;
    }
    
    .blog-sidebar .badge {
        font-size: 0.7rem !important;
        padding: 3px 6px !important;
    }
    
    /* Main Blog Cards Mobile */
    .blog-card-main {
        padding: 15px !important;
        margin-bottom: 15px !important;
        width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .blog-card-main .row {
        display: block !important;
    }
    
    .blog-card-main .col-md-4,
    .blog-card-main .col-md-8 {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    .blog-card-main .col-md-4 img,
    .blog-card-main .col-md-4 .no-image {
        height: 150px !important;
    }
    
    .blog-card-main .col-md-4 .no-image::before {
        font-size: 1rem !important;
    }
    
    .blog-card-main .col-md-8 h3 {
        font-size: 1.2rem !important;
    }
    
    .blog-card-main .blog-excerpt {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }
}

/* Main Blog Cards */
.blog-card-main {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    position: relative;
}

.blog-card-main:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #5a67d8;
}

.blog-card-main .row {
    display: flex;
    align-items: center;
}

.blog-card-main .col-md-4 img,
.blog-card-main .col-md-4 .no-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.blog-card-main .col-md-4 .no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: 2px dashed #dee2e6;
    position: relative;
}

.blog-card-main .col-md-4 .no-image::before {
    content: 'فاقد تصویر';
    font-family: 'Vazir', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #adb5bd;
}

.blog-card-main .col-md-8 h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.blog-card-main .col-md-8 h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-main .col-md-8 h3 a:hover {
    color: #667eea;
}

.blog-card-main .blog-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Category Badge Top Left */
.category-badge-top-left {
    position: absolute;
    top: 5px;
    left: 20px;
    color: white;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.category-badge-top-left:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.category-badge-top-left i {
    font-size: 0.7rem;
}

/* Date Badge on Image */
.date-badge-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
    z-index: 10;
    backdrop-filter: blur(5px);
}

.date-badge-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

.date-badge-image span {
    font-family: 'Vazir', sans-serif;
    font-size: 0.7rem;
}

/* Enhanced Blog Cards */
.blog-card-horizontal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 30px;
}

.blog-card-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card-horizontal:hover::before {
    opacity: 1;
}

.blog-card-horizontal:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

.blog-content-horizontal {
    padding: 30px;
    background: transparent;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.blog-content-horizontal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.4;
}

.blog-content-horizontal h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content-horizontal h3 a:hover {
    color: #667eea;
}

.blog-excerpt {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-bottom-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.meta-item-large {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
}

.meta-item-large i {
    color: #667eea;
    width: 20px;
    font-size: 1.1rem;
}

.comments-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.comments-count i {
    color: #667eea;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Enhanced Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

/* Sidebar Search and Sort */
.search-box-sidebar {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.search-box-sidebar:focus-within {
    border-color: #5a67d8;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.search-icon-sidebar {
    color: #667eea;
    font-size: 1rem;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.search-input-sidebar {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
    font-family: 'Vazir', sans-serif;
}

.search-input-sidebar::placeholder {
    color: #adb5bd;
    font-size: 0.85rem;
}

.sort-section {
    margin-top: 15px;
}

.sort-section .form-label {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.sort-select {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #495057;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.sort-select:focus {
    border-color: #5a67d8;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    outline: none;
}

.sort-select option {
    background: white;
    color: #495057;
    padding: 8px;
}

.blog-sidebar .card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #667eea;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-sidebar .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: #5a67d8;
}

.blog-sidebar .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0;
}

.blog-sidebar .card-header i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.blog-sidebar .card-body {
    padding: 25px;
    background: transparent;
}

/* List Group Items */
.blog-sidebar .list-group-item {
    border: none;
    padding: 0 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.blog-sidebar .list-group-item:last-child {
    border-bottom: none;
}

/* Checkbox Styles */
.blog-sidebar .form-check-input-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.blog-sidebar .form-check-input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border: 2px solid #667eea;
    border-radius: 4px;
    background-color: transparent;
}

.blog-sidebar .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.blog-sidebar .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.blog-sidebar .form-check-label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.blog-sidebar .form-check-label:hover {
    color: #667eea;
}

/* Layout Control */
.desktop-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.desktop-layout .d-flex {
    flex-grow: 1;
}

.desktop-layout .badge {
    margin-left: auto;
    flex-shrink: 0;
}

.mobile-layout {
    display: none;
}

@media (max-width: 768px) {
    .desktop-layout {
        display: none !important;
    }
    
    .mobile-layout {
        display: flex !important;
    }
}

.blog-sidebar .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    /* Background color will be set inline from database */
}

.blog-sidebar .list-group-item a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-sidebar .list-group-item a:hover {
    color: #667eea;
    text-decoration: none;
}

.blog-sidebar .list-group-item a.fw-bold {
    color: #667eea;
    font-weight: 700;
}

/* Removed conflicting badge styles */

/* Recent Posts & Popular Posts */
.blog-sidebar .d-flex {
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.blog-sidebar .d-flex:last-child {
    border-bottom: none;
}

.blog-sidebar .d-flex:hover {
    background: rgba(102, 126, 234, 0.05);
    padding: 10px 8px;
    margin: 0 -8px;
    border-radius: 10px;
}

.blog-sidebar .d-flex img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-right: 15px;
    flex-shrink: 0;
    order: 2;
}

.blog-sidebar .d-flex:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Sidebar Row Layout */
.blog-sidebar .row {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.blog-sidebar .row:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.blog-sidebar .row .col-4,
.blog-sidebar .row .col-8 {
    flex: 0 0 auto;
}

.blog-sidebar .row .col-4 {
    width: 33.333333%;
}

.blog-sidebar .row .col-8 {
    width: 66.666667%;
}

/* Sidebar No Image Placeholder */
.blog-sidebar .row .col-4 .no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    border: 2px dashed #dee2e6;
    position: relative;
}

.blog-sidebar .row .col-4 .no-image::before {
    content: 'فاقد تصویر';
    font-family: 'Vazir', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #adb5bd;
}

.blog-sidebar h6 a {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    order: 1;
    flex: 1;
}

.blog-sidebar h6 a:hover {
    color: #667eea;
    text-decoration: none;
}

.blog-sidebar .text-muted {
    color: #6c757d !important;
    font-size: 0.8rem;
}

.blog-sidebar .text-muted i {
    color: #667eea;
}

/* Blog Footer Styles */
.blog-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.blog-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.footer-section {
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo .logo-img {
    width: 50px;
    height: 50px;
    margin-left: 15px;
    border-radius: 50%;
    background: white;
    padding: 8px;
}

.footer-logo h4 {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.footer-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.footer-title {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: #667eea;
    padding-right: 8px;
    text-decoration: none;
}

.footer-links a::before {
    content: '→';
    margin-left: 8px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
    margin-left: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    color: #bdc3c7;
    font-size: 0.95rem;
}

.contact-item i {
    width: 20px;
    margin-left: 12px;
    color: #667eea;
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 25px;
    margin-top: 40px;
}

.copyright {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-bottom-links a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #667eea;
    text-decoration: none;
}

/* Footer Mobile Responsive */
@media (max-width: 768px) {
    .blog-footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }
    
    .footer-logo {
        justify-content: center;
        text-align: center;
    }
    
    .footer-logo .logo-img {
        margin-left: 0;
        margin-bottom: 10px;
    }
    
    .footer-description {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-title {
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
        margin-top: 15px;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* استایل برای متن انتخاب شده */
::selection {
    background-color: #dc3545;
    color: white;
}

::-moz-selection {
    background-color: #dc3545;
    color: white;
}
