/*
 * Archive/Blog Page Styles
 * Pixel-perfect implementation of ByteWave blog archive design
 */

/* Archive Hero Section */
.archive-hero {
    background-color: #EFF3F9;
    padding: 80px 0 60px;
    text-align: center;
}

.archive-hero .archive-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #1F2937;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.archive-hero .archive-description {
    font-size: 16px;
    line-height: 1.5;
    color: #6B7280;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Blog Archive Main Container */
.blog-archive .container {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Featured Post (First Post) */
.featured-post {
    margin-bottom: 60px;
}

.featured-post-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.featured-post-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #D1D5DB;
}

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

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

.featured-post-text {
    padding: 40px 48px 40px 0;
}

.post-category {
    display: inline-block;
    padding: 6px 16px;
    background-color: #EEF2FF;
    color: #4F46E5;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    margin-bottom: 16px;
    text-decoration: none;
}

.featured-post .post-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #1F2937;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.featured-post .post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-post .post-title a:hover {
    color: #4F46E5;
}

.featured-post .post-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.post-date {
    font-size: 14px;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.grid-post {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.grid-post-image {
    width: 100%;
    height: 240px;
    background: #D1D5DB;
    overflow: hidden;
}

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

.grid-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.grid-post-content {
    padding: 24px;
}

.grid-post .post-category {
    margin-bottom: 12px;
}

.grid-post .post-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #1F2937;
    margin: 0 0 12px 0;
}

.grid-post .post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.grid-post .post-title a:hover {
    color: #4F46E5;
}

.grid-post .post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 16px;
}

.grid-post .post-meta {
    border-top: 1px solid #E5E7EB;
    padding-top: 16px;
}

/* Post Item Styles (for index.php template) */
.posts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.post-item {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Post Thumbnail with Title Overlay */
.post-item .post-thumbnail {
    position: relative;
    width: 100%;
    height: 280px;
    background: #D1D5DB;
    overflow: hidden;
}

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

.post-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Title Overlay on Featured Image */
.post-thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
}

.post-thumbnail-overlay .entry-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #FFFFFF;
    margin: 0;
    letter-spacing: -0.01em;
}

.post-thumbnail-overlay .entry-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.post-thumbnail-overlay .entry-title a:hover {
    opacity: 0.9;
}

/* Post Content Area */
.post-item .post-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Category Links in Header */
.post-item .entry-header {
    margin-bottom: 12px;
}

.post-item .cat-links {
    margin: 0;
}

.post-item .cat-links a {
    display: inline-block;
    padding: 6px 16px;
    background-color: #EEF2FF;
    color: #4F46E5;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease;
}

.post-item .cat-links a:hover {
    background-color: #E0E7FF;
}

/* Excerpt */
.post-item .entry-summary {
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 16px;
    flex-grow: 1;
}

.post-item .entry-summary p {
    margin: 0;
}

/* Entry Footer with Read More and Meta */
.post-item .entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    gap: 16px;
}

.post-item .read-more {
    display: inline-block;
    padding: 8px 20px;
    background-color: #4F46E5;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.post-item .read-more:hover {
    background-color: #4338CA;
}

/* Author Meta with Avatar */
.post-item .entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-item .meta-avatar {
    flex-shrink: 0;
}

.post-item .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
}

.post-item .meta-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-item .byline {
    display: block;
}

.post-item .author-name {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-item .author-name:hover {
    color: #4F46E5;
}

.post-item .posted-on {
    display: block;
}

.post-item .entry-date {
    font-size: 12px;
    color: #9CA3AF;
}

/* Pagination */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

.archive-pagination .page-numbers {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 8px;
}

.archive-pagination .page-numbers li {
    display: inline-block;
}

.archive-pagination a,
.archive-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #6B7280;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
}

.archive-pagination a:hover {
    background: #F9FAFB;
    color: #4F46E5;
    border-color: #4F46E5;
}

.archive-pagination .current {
    background: #4F46E5;
    color: #FFFFFF;
    border-color: #4F46E5;
}

.archive-pagination .dots {
    background: transparent;
    border: none;
    cursor: default;
}

.archive-pagination .prev svg,
.archive-pagination .next svg {
    width: 20px;
    height: 20px;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .featured-post-content {
        gap: 32px;
    }
    
    .featured-post-text {
        padding: 32px 32px 32px 0;
    }
    
    .featured-post .post-title {
        font-size: 28px;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .posts-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .archive-hero {
        padding: 60px 0 40px;
    }
    
    .archive-hero .archive-title {
        font-size: 36px;
    }
    
    .blog-archive .container {
        padding-top: 40px;
        padding-bottom: 60px;
    }
    
    .featured-post {
        margin-bottom: 40px;
    }
    
    .featured-post-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-post-image {
        min-height: 300px;
    }
    
    .featured-post-text {
        padding: 32px 24px;
    }
    
    .featured-post .post-title {
        font-size: 24px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .grid-post-image {
        height: 200px;
    }
    
    .posts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-item .post-thumbnail {
        height: 240px;
    }
    
    .post-thumbnail-overlay .entry-title {
        font-size: 20px;
    }
    
    .post-item .post-content {
        padding: 20px;
    }
    
    .post-item .entry-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .archive-hero .archive-title {
        font-size: 28px;
    }
    
    .archive-hero .archive-description {
        font-size: 14px;
    }
    
    .featured-post .post-title {
        font-size: 20px;
    }
    
    .grid-post .post-title {
        font-size: 18px;
    }
    
    .archive-pagination a,
    .archive-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .post-item .post-thumbnail {
        height: 200px;
    }
    
    .post-thumbnail-overlay {
        padding: 16px;
    }
    
    .post-thumbnail-overlay .entry-title {
        font-size: 18px;
    }
    
    .post-item .post-content {
        padding: 16px;
    }
    
    .post-item .read-more {
        padding: 6px 16px;
        font-size: 13px;
    }
}

