/**
 * Blog Listing Template Styles
 * Modern blog listing with hero section and post cards
 */

/* Blog Hero Header */
.blog-hero-header {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    overflow: hidden;
}

.blog-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Hero Content */
.blog-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Breadcrumbs */
.blog-breadcrumbs {
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.breadcrumb-current {
    opacity: 0.8;
    font-weight: 500;
}

/* Blog Title */
.blog-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-hero-description {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 2xl;
    margin: 0 auto;
}

/* Blog Main */
.blog-main {
    background: white;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Blog Post Card */
.blog-post-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #e5e7eb;
}

/* Post Card Image */
.post-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-link:hover .image-overlay {
    opacity: 1;
}

.image-link:hover .post-thumbnail {
    transform: scale(1.05);
}

.read-icon {
    width: 2rem;
    height: 2rem;
    color: white;
}

/* Post Card Content */
.post-card-content {
    padding: 1.5rem;
}

/* Post Meta */
.post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-meta-item {
    display: flex;
    align-items: center;
}

.post-meta-item svg {
    flex-shrink: 0;
}

.post-meta-item a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-meta-item a:hover {
    color: #3b82f6;
}

/* Post Title */
.post-card-title {
    margin-bottom: 1rem;
}

.title-link {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.title-link:hover {
    color: #3b82f6;
}

/* Post Excerpt */
.post-card-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.post-card-excerpt p {
    margin: 0;
}

/* Post Card Footer */
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: #1d4ed8;
    transform: translateX(2px);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.author-label {
    color: #9ca3af;
}

.author-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #3b82f6;
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.blog-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
    padding: 0.5rem 1rem;
    gap: 0.5rem;
}

.blog-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.blog-pagination .page-numbers.dots:hover {
    background: transparent;
    color: #6b7280;
}

/* No Posts Found */
.no-posts-found {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.no-posts-content {
    text-align: center;
    max-width: 28rem;
}

.no-posts-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #9ca3af;
}

.no-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.no-posts-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-description {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .blog-hero-header {
        min-height: 30vh;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-description {
        font-size: 1rem;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-card-content {
        padding: 1.25rem;
    }
    
    .post-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .post-card-meta {
        gap: 0.75rem;
        font-size: 0.8125rem;
    }
    
    .breadcrumb-list {
        justify-content: flex-start;
        font-size: 0.8125rem;
    }
    
    .blog-pagination .page-numbers.prev,
    .blog-pagination .page-numbers.next {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card-image {
        aspect-ratio: 4/3;
    }
    
    .blog-pagination .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .blog-hero-header {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .blog-hero-background,
    .blog-hero-overlay {
        display: none;
    }
    
    .blog-pagination,
    .image-overlay {
        display: none;
    }
    
    .blog-post-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        break-inside: avoid;
        margin-bottom: 2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .blog-post-card,
    .post-thumbnail,
    .image-overlay,
    .read-more-btn,
    .back-home-btn {
        transition: none;
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .blog-post-card {
        border: 2px solid #374151;
    }
    
    .breadcrumb-link:hover {
        background: white;
        color: black;
    }
    
    .blog-pagination .page-numbers:hover,
    .blog-pagination .page-numbers.current {
        background: #1f2937;
        border-color: #1f2937;
    }
}