/* Blog Page Styling - Mosahel */

/* Sidebar & Layout Styles */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    margin-top: 2rem;
}

.blog-main {
    min-width: 0;
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-card {
    background: #fff;
    padding: 1.8rem;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(2, 83, 154, 0.05);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.8rem;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-bottom: 12px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

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

.category-item {
    margin-bottom: 12px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-radius: 15px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
}

.category-link:hover,
.category-link.active {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(89, 53, 140, 0.1);
}

.category-count {
    font-size: 0.8rem;
    background: #edf2f7;
    padding: 2px 10px;
    border-radius: 20px;
    color: #718096;
    transition: all 0.3s ease;
}

.category-link:hover .category-count,
.category-link.active .category-count {
    background: var(--primary);
    color: #fff;
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    align-items: center;
}

.recent-post-thumb {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.recent-post-info h4 {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 6px;
    color: #1a202c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.recent-post-item:hover h4 {
    color: var(--primary);
}

.recent-post-meta {
    font-size: 0.75rem;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 5rem;
    flex-wrap: wrap;
}

.page-node {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 2px solid #edf2f7;
    background: #fff;
    color: #4a5568;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.page-node:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(89, 53, 140, 0.1);
}

.page-node.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(89, 53, 140, 0.25);
}

.page-node.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

/* Blog Meta Styling (Date & Category) */
.blog-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.blog-meta span {
    font-size: 0.72rem !important;
    font-weight: 600;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta i {
    font-size: 0.8rem;
    color: var(--secondary);
}

.blog-cat {
    background: rgba(2, 83, 154, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--primary) !important;
}

/* Sidebar CTA Enhancement */
.sidebar-card.cta-sidebar {
    background: linear-gradient(135deg, #59358C 0%, #3a225c 100%);
    color: #fff;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    border: none;
}

.sidebar-card.cta-sidebar::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 1;
}

.cta-sidebar h4 {
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.cta-sidebar p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.cta-sidebar .btn-premium {
    background: #fff;
    color: #59358C;
    font-weight: 700;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 2;
    border: none;
}

.cta-sidebar .btn-premium:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.blog-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: -40px auto 3rem;
    position: relative;
    z-index: 20;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1000px;
    border: 1px solid rgba(2, 83, 154, 0.05);
}

.search-box-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #59358C;
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 2px solid #f1f5f9;
    border-radius: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: #f8fafc;
}

.search-input:focus {
    border-color: #59358C;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(89, 53, 140, 0.1);
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-weight: 700;
    color: #1a202c;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-select {
    padding: 12px 20px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    color: #4a5568;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 40px;
}

.no-results-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 20px;
    display: none;
}

.no-results-found i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .blog-layout {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
}

@media (max-width: 991px) {
    .blog-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .blog-sidebar {
        order: 1;
    }

    .blog-main {
        order: 2;
    }
}

@media (max-width: 768px) {
    .blog-filters-bar {
        margin-top: -30px;
        padding: 1.2rem;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-options {
        justify-content: space-between;
    }
}
