/* Blog Page Styles */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 200px 15px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 20%);
}

.blog-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Blog Categories */
.blog-categories {
    background-color: rgba(33, 33, 33, 0.8);
    padding: 20px 0;
    position: sticky;
    top: 80px;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-color);
}

.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
}

.category {
    padding: 8px 16px;
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category:hover,
.category.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Blog Posts */
.blog-posts {
    padding: 60px 15px;
    background-color: #1a1a1a;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.post {
    background-color: rgba(33, 33, 33, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.post.featured-post {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 400px;
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post.featured-post .post-image {
    flex: 1;
    max-width: 50%;
}

.post-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post.featured-post .post-image img {
    height: 100%;
}

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

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 0.7rem;
    text-transform: uppercase;
    z-index: 2;
}

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

.post.featured-post .post-content {
    flex: 1;
    max-width: 50%;
}

.post h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    line-height: 1.3;
}

.post.featured-post h3 {
    font-size: 1.8rem;
}

.post-excerpt {
    margin-bottom: 20px;
    color: #CCCCCC;
    flex: 1;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #999999;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.read-more:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.4);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(33, 33, 33, 0.7);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-link:disabled:hover {
    background-color: rgba(33, 33, 33, 0.7);
    border-color: var(--border-color);
}

.page-link.prev,
.page-link.next {
    width: auto;
    padding: 0 15px;
}

.page-ellipsis {
    color: var(--text-color);
    font-size: 1.2rem;
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, #2d2d2d 0%, #1e1e1e 100%);
    padding: 80px 0;
    text-align: center;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.newsletter h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
    color: #CCCCCC;
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    min-width: 300px;
    padding: 12px 20px;
    background-color: rgba(33, 33, 33, 0.7);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form input::placeholder {
    color: #999999;
}

/* Blog Post Detail Page Styles */
.blog-post-detail {
    padding: 80px 0;
    background-color: #1a1a1a;
}

.post-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 40px;
    text-align: center;
}

.post-detail-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.3;
    word-wrap: break-word;
}

.post-detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #999999;
}

.post-detail-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid var(--border-color);
    margin-bottom: 40px;
}

.post-detail-content {
    background-color: rgba(33, 33, 33, 0.7);
    padding: 40px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.post-detail-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.post-detail-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 1.4rem;
}

.post-detail-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #CCCCCC;
}

.post-detail-content ul,
.post-detail-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
    color: #CCCCCC;
}

.post-detail-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.post-detail-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-detail-content a:hover {
    color: var(--accent-color);
}

.post-detail-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
    font-style: italic;
}

.post-detail-content code {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #FF5722;
}

.post-detail-content pre {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-detail-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Author Section */
.author-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 30px;
    background-color: rgba(33, 33, 33, 0.7);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

.author-info h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.author-bio {
    color: #CCCCCC;
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.author-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.related-posts h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.related-post {
    background-color: rgba(33, 33, 33, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.related-post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.related-post-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post:hover .related-post-image img {
    transform: scale(1.1);
}

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

.related-post-content h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.related-post-date {
    font-size: 0.8rem;
    color: #999999;
    margin-bottom: 15px;
}

/* Comments Section */
.comments-section {
    margin-top: 60px;
}

.comments-section h2 {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.comments-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.comment-form {
    background-color: rgba(33, 33, 33, 0.7);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 40px;
}

.comment-form h3 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.comments-list {
    margin-top: 40px;
}

.comment {
    background-color: rgba(33, 33, 33, 0.7);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author-name {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.8rem;
    color: #999999;
}

.comment-content {
    color: #CCCCCC;
    line-height: 1.6;
}

.comment-reply {
    margin-top: 15px;
    text-align: right;
}

.comment-reply-btn {
    font-size: 0.9rem;
    color: var(--primary-color);
    cursor: pointer;
}

.comment-reply-btn:hover {
    color: var(--accent-color);
}

/* Responsive Blog Styles */
@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .post.featured-post {
        min-height: 350px;
        flex-direction: column;
    }
    
    .post.featured-post .post-image,
    .post.featured-post .post-content {
        max-width: 100%;
    }
    
    .post.featured-post .post-image img {
    aspect-ratio: 16/9;
    height: auto;
}
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 15px 40px;
    }
    
    .blog-hero h2 {
        font-size: 2rem;
    }
    
    .categories-container {
        flex-wrap: wrap;
    }
    
    .category {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .blog-posts {
        padding: 40px 15px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .post.featured-post {
        flex-direction: column;
        min-height: auto;
    }
    
    .post.featured-post .post-image,
    .post.featured-post .post-content {
        max-width: 100%;
        flex: none;
    }
    
    .post.featured-post .post-image img {
        aspect-ratio: 16/9;
        height: auto;
    }
    
    .post.featured-post h3 {
        font-size: 1.4rem;
    }
    
    .post-image img {
        aspect-ratio: 16/9;
        height: auto;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        min-width: auto;
    }
    
    .post-detail-title {
        font-size: 1.7rem;
    }
    
    .post-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-detail-content {
        padding: 25px;
    }
    
    .author-section {
        flex-direction: column;
        text-align: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-hero h2 {
        font-size: 1.6rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .post-image img {
        aspect-ratio: 16/9;
        height: auto;
    }
    
    .post h3 {
        font-size: 1.2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .read-more {
        padding: 8px 16px;
        font-size: 0.7rem;
        width: 100%;
        text-align: center;
    }
    
    .post.featured-post h3 {
        font-size: 1.5rem;
    }
    
    .post-detail-title {
        font-size: 1.5rem;
    }
    
    .post-detail-content {
        padding: 20px;
    }
    
    .post-detail-content h2 {
        font-size: 1.5rem;
    }
    
    .post-detail-content h3 {
        font-size: 1.2rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}