/* Blog Container */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Add extra top padding for blog and archive pages to prevent header overlap */
.page-template-page-blog .blog-container,
.category .blog-container,
.tag .blog-container,
.search .blog-container,
.archive .blog-container {
    padding-top: 80px !important;
}

/* Blog Main Content */
.blog-main {
    min-width: 0;
}

.blog-header {
    margin-bottom: 40px;
}

.blog-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.archive-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 10px;
}

/* Blog Grid - Three Columns */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    width: 100%;
    padding-bottom: 66%; /* Makes it rectangular (3:2 aspect ratio) */
    position: relative;
    overflow: hidden;
}

.blog-card-image a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-content {
    padding: 18px;
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.blog-date {
    color: #999;
}

.blog-category a {
    color: #ec4899;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 10px;
    border: 1.5px solid #ec4899;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.blog-category a:hover {
    color: #fff;
    background: #ec4899;
    border-color: #ec4899;
}

.blog-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.3;
}

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

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

.blog-card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-read-more {
    color: #ec4899;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: #db2777;
}

/* Pagination */
.blog-pagination {
    grid-column: 1 / -1;
    margin-top: 20px;
    text-align: center;
}

.blog-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: #ec4899;
    color: #fff;
    border-color: #ec4899;
}

/* No Posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* ==================== SINGLE POST ==================== */

.single-post-article {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.single-post-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 15px 0;
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: #999;
    font-size: 0.95rem;
}

.single-post-meta .post-author {
    color: #999;
}

.single-post-meta .meta-separator {
    color: #999;
}

.single-post-meta .post-date {
    color: #999;
}

.single-post-thumbnail {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
}

.single-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.single-post-content p {
    margin-bottom: 1.5em;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: #1a1a1a;
}

.single-post-content h2 {
    font-size: 2rem;
}

.single-post-content h3 {
    font-size: 1.6rem;
}

.single-post-content h4 {
    font-size: 1.3rem;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.single-post-content li {
    margin-bottom: 0.5em;
}

.single-post-content a {
    color: #ec4899;
    text-decoration: none;
    border-bottom: 1px solid rgba(236, 72, 153, 0.3);
    transition: border-color 0.3s ease;
}

.single-post-content a:hover {
    border-bottom-color: #ec4899;
}

.single-post-content img {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    display: block;
}

.single-post-content blockquote {
    border-left: 4px solid #ec4899;
    padding-left: 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: #555;
}

/* Post Meta Footer */
.post-meta-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.posted-in-label {
    color: #666;
    font-weight: 600;
    font-size: 0.95rem;
}

.post-meta-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-meta-tag:hover {
    background: #ec4899;
    color: #fff;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
    padding-bottom: 40px;
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.nav-title:hover {
    color: #ec4899;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.related-posts-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.related-post-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-3px);
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    padding: 15px;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.related-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #ec4899;
}

.related-post-date {
    color: #999;
    font-size: 0.85rem;
}

/* ==================== SIDEBAR ==================== */

.blog-sidebar {
    position: sticky;
    top: 130px;
    height: fit-content;
    z-index: 90;
}

@media (max-width: 992px) {
    .blog-sidebar {
        position: static;
        top: auto;
    }
}

/* CTA Widget - Cyberpunk Style */
.sidebar-cta-widget {
    background: linear-gradient(135deg, #2d1f47 0%, #1a1025 50%, #15101f 100%);
    border-radius: 16px;
    padding: 40px 25px;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(196, 76, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-cta-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(196, 76, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: ctaGlow 8s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    0% { opacity: 0.5; transform: rotate(0deg); }
    100% { opacity: 1; transform: rotate(10deg); }
}

.sidebar-cta-content {
    position: relative;
    z-index: 1;
}

.sidebar-cta-content h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin: 0 0 25px;
    text-shadow: 0 0 20px rgba(196, 76, 255, 0.6),
                 0 0 40px rgba(196, 76, 255, 0.4),
                 0 0 60px rgba(196, 76, 255, 0.2);
}

.sidebar-cta-button {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44cff 50%, #00d4ff 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(196, 76, 255, 0.4),
                0 4px 15px rgba(255, 107, 157, 0.3);
    position: relative;
    z-index: 1;
}

.sidebar-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(196, 76, 255, 0.6),
                0 6px 25px rgba(255, 107, 157, 0.4);
    color: #fff;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
}

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

.search-field {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: #ec4899;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #ec4899;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #db2777;
}

/* Popular Posts Widget */
.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.popular-post-thumbnail {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
}

.popular-post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.popular-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popular-post-info a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.popular-post-info a:hover {
    color: #ec4899;
}

.popular-post-date {
    color: #999;
    font-size: 0.8rem;
}

/* ==================== RESPONSIVE ==================== */

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

@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 20px 15px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .single-post-title {
        font-size: 1.6rem;
    }
    
    .single-post-article {
        padding: 25px 20px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .sidebar-cta-widget {
        padding: 30px 20px;
    }
    
    .sidebar-cta-content h3 {
        font-size: 1.3rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .nav-next {
        text-align: left;
    }
}

