/**
 * Blog Styles
 * EliteAir Theme
 */

/* Blog Common Styles */
.blog-main,
.archive-main,
.single-post-main {
    min-height: 100vh;
    background: #242424;
    padding-top: 0px;
}

/* Blog Header */
.blog-header,
.archive-header {
    padding: 4rem 0;
    background: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 300px;
    display: block;
}

.blog-header.has-background,
.archive-header.has-background {
    background-color: rgba(36, 36, 36, 0.7);
}

.blog-header.has-background::before,
.archive-header.has-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(36, 36, 36, 0.4);
    z-index: 1;
}

.blog-header .container,
.archive-header .container {
    position: relative;
    z-index: 2;
    text-align: left;
}

.blog-title,
.archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-align: left;
}

.blog-description,
.archive-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
    text-align: left;
}

.archive-subtitle {
    font-size: 1rem;
    color: #67d9fc;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Author Archive Header */
.author-archive-header {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.author-archive-header .author-avatar {
    flex-shrink: 0;
}

.author-archive-header .author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #67d9fc;
}

.author-info {
    flex: 1;
}

.author-bio {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

.author-meta {
    margin-top: 1rem;
}

.post-count {
    font-size: 0.9rem;
    color: #67d9fc;
    font-weight: 500;
}

/* Blog Content Layout */
.blog-content,
.archive-content {
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.blog-grid.has-sidebar {
    grid-template-columns: 1fr 300px;
}

.posts-column {
    min-width: 0;
}

.sidebar-column {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Posts Grid - Masonry Layout */
.posts-grid {
    width: 100%;
}

.posts-grid .post-card {
    width: calc(33.333% - 20px);
    margin-bottom: 30px;
    break-inside: avoid;
}

/* Post Card */
.post-card {
    background: #2a2a2a;
    border-radius: 0.25rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.post-card:hover .post-card-title {
    color: #67d9fc;
}

.post-card-read-more {
    color: #67d9fc;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.post-card:hover .post-card-read-more {
    color: #fff;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
}

.no-posts h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.no-posts p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Pagination */
.blog-pagination {
    margin-top: 4rem;
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border: 1px solid #3a3a3a;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: #fff;
    background: #3a3a3a;
    border-color: #67d9fc;
}

.page-link.current {
    color: #242424;
    background: #67d9fc;
    border-color: #67d9fc;
    font-weight: 600;
}

/* Single Post Styles */
.single-post {
    background: #242424;
}

/* Post Header */
.post-header {
    padding: 2rem 0;
    flex-direction: column;
    justify-content: space-between;
    background: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.post-header.has-background {
    background-color: rgba(36, 36, 36, 0.7);
}

.post-header.has-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(36, 36, 36, 0.4);
    z-index: 1;
}

.post-header .container {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    align-self: center;
    text-align: center;
    padding-top: 0.5rem;
}

.breadcrumb-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #67d9fc;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0.5rem 0 1rem; /* smaller top margin, normal bottom */
    line-height: 1.2;
}

/* Post Author Info */
.post-author-info {
  margin-top: auto;
  padding-top: 1rem;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #67d9fc;
}

.author-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.author-name a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.author-name a:hover {
    color: #67d9fc;
}

.author-position {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Featured Image */
.post-featured-image {
    margin: 2rem 0;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.featured-image-caption {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Post Content */
.post-content-wrapper {
    padding: 4rem 0;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.post-layout.has-sidebar {
    grid-template-columns: 1fr 300px;
}

.post-content {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #fff;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.post-content h2 {
    font-size: 2rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: #67d9fc;
    text-decoration: underline;
}

.post-content a:hover {
    color: #fff;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #2a2a2a;
    border-left: 4px solid #67d9fc;
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 2rem 0;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background: #2a2a2a;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 0.25rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Page Links */
.page-links {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #3a3a3a;
    border-bottom: 1px solid #3a3a3a;
}

/* Post Tags */
.post-tags {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #3a3a3a;
    border-bottom: 1px solid #3a3a3a;
}

.tags-label {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 1rem;
}

.post-tag {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.25rem 1rem;
    background: #3a3a3a;
    color: #67d9fc;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.post-tag:hover {
    background: #67d9fc;
    color: #242424;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #3a3a3a;
}

.nav-previous,
.nav-next {
    display: block;
    padding: 1.5rem;
    background: #2a2a2a;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-next {
    text-align: right;
}

.nav-previous:hover,
.nav-next:hover {
    background: #3a3a3a;
    transform: translateY(-2px);
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: #67d9fc;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: #2a2a2a;
    border-radius: 0.25rem;
    margin: 3rem 0;
}

.author-box .author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.author-box .author-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.author-box .author-name a {
    color: #fff;
    text-decoration: none;
}

.author-box .author-name a:hover {
    color: #67d9fc;
}

.author-box .author-bio {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Sidebar Styles */
.blog-sidebar {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 0.25rem;
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #67d9fc;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    margin-bottom: 0.5rem;
}

.widget a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget a:hover {
    color: #67d9fc;
}

/* Search Widget */
.widget_search .search-form {
    display: flex;
    gap: 0.5rem;
}

.widget_search .search-field {
    flex: 1;
    padding: 0.5rem 1rem;
    background: #3a3a3a;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: #fff;
}

.widget_search .search-submit {
    padding: 0.5rem 1.5rem;
    background: #67d9fc;
    color: #242424;
    border: none;
    border-radius: 0.25rem;
    font-weight: 600;
    cursor: pointer;
}

/* Comments Styles */
.comments-area {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #3a3a3a;
}

.comments-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #2a2a2a;
    border-radius: 0.25rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: #fff;
}

.comment-metadata {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.comment-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 1rem;
    color: #67d9fc;
    text-decoration: none;
    font-weight: 500;
}

/* Comment Form */
.comment-respond {
    margin-top: 3rem;
}

.comment-reply-title {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2rem;
}

.comment-form label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #3a3a3a;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: #fff;
    margin-bottom: 1rem;
}

.comment-form .submit {
    padding: 0.75rem 2rem;
    background: #67d9fc;
    color: #242424;
    border: none;
    border-radius: 0.25rem;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-grid,
    .post-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sidebar-column {
        position: static;
    }

    .post-title {
        font-size: 2.5rem;
    }

    .posts-grid .post-card {
        width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .blog-header,
    .archive-header {
        padding: 4rem 0 3rem;
    }

    .blog-title,
    .archive-title {
        font-size: 2rem;
    }

    .author-archive-header {
        flex-direction: column;
        text-align: center;
    }

    .post-card-content {
        padding: 1.5rem;
    }

    .post-header {
        min-height: 220px;
        padding: 1.5rem 0;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .blog-sidebar {
        padding: 1.5rem;
    }

    .posts-grid .post-card {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .blog-content,
    .archive-content,
    .post-content-wrapper {
        padding: 2rem 0;
    }

    .posts-grid {
        gap: 2rem;
    }

    .post-card-title {
        font-size: 1.25rem;
    }

    .post-meta-bottom {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .post-content {
        font-size: 1rem;
    }
}
