/* ==========================================================================
   Blog & CMS Styles — Premium Modern Design
   ========================================================================== */

/* Layout & Typography */
.blog-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.blog-main {
    flex: 1;
    min-width: 60%;
}

.blog-sidebar-wrap {
    width: 320px;
    flex-shrink: 0;
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Post Card (Glassmorphism & Micro-animations) */
.post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(13, 55, 112, 0.05);
    border: 1px solid rgba(13, 55, 112, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(13, 55, 112, 0.1);
    border-color: rgba(13, 55, 112, 0.15);
}

.post-card-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.post-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-weight: 500;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.post-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.post-card-title a:hover {
    color: #2563eb;
}

.post-card-excerpt {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-card-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.post-card-author-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.post-card-readmore {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.post-card:hover .post-card-readmore {
    gap: 8px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(13, 55, 112, 0.05);
    border: 1px solid rgba(13, 55, 112, 0.08);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #2563eb;
}

/* Search Widget */
.search-input-wrap {
    position: relative;
    display: flex;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px 0 0 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #2563eb;
}

.search-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #1d4ed8;
}

/* Categories List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list li:last-child {
    margin-bottom: 0;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    background: #f8fafc;
}

.category-link:hover, .category-link.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.category-count {
    background: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Popular Posts */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-post-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    group: hover;
}

.popular-post-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.popular-post-img.placeholder {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 24px;
}

.popular-post-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.popular-post-item:hover .popular-post-title {
    color: #2563eb;
}

.popular-post-date {
    font-size: 0.75rem;
    color: #64748b;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-link {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-cloud-link:hover, .tag-cloud-link.active {
    background: #2563eb;
    color: white;
}

/* CTA Widget */
.widget-cta {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
}

.widget-cta .widget-title {
    color: white;
    border-bottom-color: rgba(255,255,255,0.1);
}

.widget-cta h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

.widget-cta p {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cta-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Header Banner */
.blog-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.2) 0%, transparent 40%);
}

.blog-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.blog-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.blog-header p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .blog-sidebar-wrap {
        width: 100%;
    }
}
