/* Blog Specific Styles */

/* Filter Buttons */
.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 9999px;
    color: #9CA3AF;
    font-size: 0.875rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60A5FA;
}

.filter-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3B82F6;
    color: #3B82F6;
}

/* View Toggle Buttons */
.view-toggle {
    padding: 0.5rem 1rem;
    background: transparent;
    color: #6B7280;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.3s;
}

.view-toggle.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3B82F6;
    color: #3B82F6;
}

/* Blog Post Cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card {
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    opacity: 0;
    transition: opacity 0.3s;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

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

/* List View Styles */
.blog-list-item {
    background: rgba(17, 24, 39, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.2);
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    gap: 1.5rem;
    align-items: start;
    transition: all 0.3s;
}

.blog-list-item:hover {
    background: rgba(17, 24, 39, 0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

.blog-list-item .post-date {
    min-width: 140px;
    padding: 0.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 0.375rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #60A5FA;
    transition: all 0.2s;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3B82F6;
    transform: scale(1.05);
}

/* Sidebar Styles */
.sidebar-card {
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Popular Posts in Sidebar */
.popular-post-item {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-number {
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

/* Category List */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(55, 65, 81, 0.2);
    border-radius: 0.375rem;
    transition: all 0.3s;
    cursor: pointer;
}

.category-item:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.category-count {
    background: rgba(59, 130, 246, 0.3);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Tag Cloud */
#tags-cloud .tag {
    cursor: pointer;
}

#tags-cloud .tag.size-sm {
    font-size: 0.75rem;
    opacity: 0.7;
}

#tags-cloud .tag.size-md {
    font-size: 0.875rem;
}

#tags-cloud .tag.size-lg {
    font-size: 1rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.2);
}

/* Archive List */
.archive-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #9CA3AF;
    transition: color 0.3s;
    cursor: pointer;
}

.archive-item:hover {
    color: #60A5FA;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

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

.search-highlight {
    background: rgba(251, 191, 36, 0.3);
    color: #FCD34D;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s;
    z-index: 1001;
}

/* Post Meta Icons */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(55, 65, 81, 0.3) 25%, 
        rgba(75, 85, 99, 0.3) 50%, 
        rgba(55, 65, 81, 0.3) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.375rem;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 300px;
    border-radius: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-list-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .blog-list-item .post-date {
        min-width: auto;
        width: fit-content;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Code Blocks for Blog Posts */
pre[class*="language-"] {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    margin-top: 2rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 0.375rem;
    color: #9CA3AF;
    transition: all 0.3s;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter:hover {
    background: rgba(29, 161, 242, 0.2);
    color: #1DA1F2;
}

.share-btn.linkedin:hover {
    background: rgba(0, 119, 181, 0.2);
    color: #0077B5;
}

.share-btn.facebook:hover {
    background: rgba(24, 119, 242, 0.2);
    color: #1877F2;
}