/* Blog Page Specific Styles */

.blog-page-header {
    text-align: center;
    padding: 3rem 0 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.blog-page-header h1 {
    font-family: var(--ff-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.8rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-page-header p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Search Section */
.blog-search-section {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--card-bg);
    font-family: var(--ff-sans);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--deep-teal);
    box-shadow: 0 0 0 3px rgba(79, 139, 140, 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Filter Buttons */
.blog-filter-section {
    max-width: 900px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    background: var(--card-bg);
    font-family: var(--ff-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--deep-teal);
    color: var(--deep-teal);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #4f8b8c, #2d6b6c);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(45, 107, 108, 0.3);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(44, 40, 34, 0.15);
}

.blog-image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.blog-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.blog-content-wrapper {
    padding: 2rem;
}

/* Category Badge */
.blog-category {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.category-programming {
    background: rgba(79, 139, 140, 0.15);
    color: #2d6b6c;
}

.category-books {
    background: rgba(201, 126, 90, 0.15);
    color: #b45f3a;
}

.category-business {
    background: rgba(216, 162, 92, 0.15);
    color: #c8873d;
}

.category-life {
    background: rgba(179, 136, 153, 0.15);
    color: #8b5a6f;
}

.category-updates {
    background: rgba(107, 107, 107, 0.15);
    color: #6b6b6b;
}

.category-writing {
    background: rgba(180, 95, 58, 0.15);
    color: #b45f3a;
}

.category-self-improvement {
    background: rgba(45, 107, 108, 0.15);
    color: #2d6b6c;
}

/* Blog Meta */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.blog-date {
    font-family: var(--ff-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-read-time {
    font-family: var(--ff-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-card h2 {
    font-family: var(--ff-serif);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.blog-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Author */
.blog-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-light);
    margin-bottom: 1.2rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8b8c, #b45f3a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--ff-serif);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.author-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--ff-mono);
}

/* Blog Stats */
.blog-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ff-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-icon {
    font-size: 1rem;
}

/* Mobile - Compact Design */
@media (max-width: 780px) {
    .blog-page-header {
        padding: 2rem 0 1.5rem;
    }
    
    .blog-page-header h1 {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .blog-page-header p {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
    
    .blog-search-section {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }
    
    .search-input {
        padding: 0.9rem 1.2rem 0.9rem 3rem;
        font-size: 0.95rem;
    }
    
    .search-icon {
        left: 1.2rem;
        width: 18px;
        height: 18px;
    }
    
    .blog-filter-section {
        padding: 0 1rem;
        margin-bottom: 2rem;
        gap: 0.6rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .blog-grid {
        gap: 2rem;
        padding: 0 1rem 2rem;
    }
    
    .blog-card {
        border-radius: 18px;
    }
    
    .blog-image-wrapper {
        padding-bottom: 56.25%; /* 16:9 */
    }
    
    .blog-content-wrapper {
        padding: 1.5rem;
    }
    
    .blog-category {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
    
    .blog-meta {
        margin-bottom: 0.6rem;
        gap: 0.8rem;
    }
    
    .blog-date,
    .blog-read-time {
        font-size: 0.75rem;
    }
    
    .blog-card h2 {
        font-size: 1.25rem;
        margin-bottom: 0.6rem;
    }
    
    .blog-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.2rem;
    }
    
    .blog-author {
        margin-bottom: 1rem;
        padding-top: 1rem;
    }
    
    .author-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .author-name {
        font-size: 0.85rem;
    }
    
    .blog-stats {
        gap: 1.2rem;
    }
    
    .stat-item {
        font-size: 0.8rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .blog-image-wrapper {
        padding-bottom: 56.25%;
    }
    
    .blog-content-wrapper {
        padding: 1.2rem;
    }
    
    .blog-card h2 {
        font-size: 1.15rem;
    }
    
    .blog-excerpt {
        font-size: 0.85rem;
    }
    
    .blog-stats {
        gap: 1rem;
    }
    
    .filter-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.75rem;
    }
}

/* No results message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}