/**
 * Minimal Structural CSS for Avada Integration
 *
 * This file contains only essential layout CSS needed for proper display.
 * All visual styling (colors, fonts, spacing) is inherited from Avada's theme.
 */

/* Center and reorder single post */
.hashnode_post,
.type-hashnode_post {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

/* Title first */
.hashnode_post > h1.entry-title,
.hashnode_post > .entry-title,
.type-hashnode_post > h1.entry-title,
.type-hashnode_post > .entry-title {
    order: 1 !important;
    max-width: 900px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Image second */
.hashnode_post > .fusion-flexslider,
.hashnode_post > .fusion-post-slideshow,
.type-hashnode_post > .fusion-flexslider,
.type-hashnode_post > .fusion-post-slideshow {
    order: 2 !important;
    max-width: 900px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Content third */
.hashnode_post > .post-content,
.type-hashnode_post > .post-content {
    order: 3 !important;
    max-width: 900px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Everything else after */
.hashnode_post > .related-posts,
.hashnode_post > .comments-container,
.type-hashnode_post > .related-posts,
.type-hashnode_post > .comments-container {
    order: 10 !important;
}

.fusion-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.fusion-post-grid .fusion-image-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.fusion-post-grid .fusion-post-content-wrapper {
    padding: 20px;
}

.fusion-post-grid .fusion-meta-info {
    margin-bottom: 15px;
}

.fusion-post-grid .fusion-read-more {
    margin-top: 15px;
}

.fusion-post-content-container p:last-child {
    margin-bottom: 0;
}

.fusion-archive-description {
    margin-bottom: 30px;
}

.post-content-wrapper {
    margin-top: 20px;
}

.fusion-post-navigation {
    margin-top: 40px;
    padding-top: 20px;
}

@media (max-width: 768px) {
    .fusion-posts-container {
        grid-template-columns: 1fr;
    }
}

/**
 * Avada Native Template Integration
 * When Avada's templates are used (not plugin templates), target Avada's structure
 */

/* Reorder elements within Avada's article structure */
.single-hashnode_post article.post,
.single-hashnode_post .fusion-post-content-wrapper {
    display: flex !important;
    flex-direction: column !important;
}

/* Title/meta wrapper first */
.single-hashnode_post .fusion-post-title-meta-wrap,
.single-hashnode_post .entry-header {
    order: 1 !important;
}

/* Featured image second */
.single-hashnode_post .fusion-flexslider,
.single-hashnode_post .fusion-post-slideshow,
.single-hashnode_post .fusion-featured-image-wrapper {
    order: 2 !important;
}

/* Main content third */
.single-hashnode_post .fusion-post-content,
.single-hashnode_post .post-content {
    order: 3 !important;
}

/* Meta info, social sharing, etc. after content */
.single-hashnode_post .fusion-meta-info-wrapper,
.single-hashnode_post .fusion-sharing-box,
.single-hashnode_post .about-author,
.single-hashnode_post .related-posts,
.single-hashnode_post .comments-container {
    order: 10 !important;
}
