/* ==========================================================================
   RMF Blog Styles - Extends foundation.css and styles.css
   ========================================================================== */

/* Blog Filters */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(26, 39, 68, 0.1);
}

.filter-btn {
    background: var(--white);
    border: 1px solid var(--cream);
    color: var(--navy);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--navy);
    color: var(--cream);
    border-color: var(--navy);
}

/* Post Cards Grid */
.blog-posts {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: var(--white);
    padding: 2rem;
    border-left: 3px solid var(--gold);
    transition: transform 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card h2 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    font-weight: 600;
}

.post-card h2 a {
    color: var(--navy);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--gold);
}

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
}

.post-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-meta .author {
    margin-left: 0.5rem;
}

.post-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single Post Layout */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--cream);
}

.post-header h1 {
    font-size: 2rem;
    color: var(--navy);
    margin: 1rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.post-header .post-meta {
    margin-bottom: 0;
}

.post-header .post-meta a {
    color: var(--gold);
    text-decoration: none;
}

.post-header .post-meta a:hover {
    text-decoration: underline;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--cream-light);
    color: var(--navy);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    font-weight: 500;
}

/* Post Content */
.post-content {
    line-height: 1.8;
    color: var(--navy);
}

.post-content h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--navy);
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
    color: var(--navy);
    font-weight: 600;
}

.post-content h4 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--navy);
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--cream-light);
    border-left: 4px solid var(--gold);
    font-style: italic;
}

.post-content blockquote p {
    margin-bottom: 0;
}

.post-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: var(--gold);
    font-size: 0.9375rem;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-content pre {
    background: var(--navy);
    color: var(--cream);
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-content code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.post-content figure {
    margin: 2rem 0;
}

.post-content figure img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Callouts */
.callout {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--gold);
    background: var(--cream-light);
}

.callout strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.callout p {
    margin-bottom: 0;
    color: #555;
}

.callout-info {
    background: rgba(79, 172, 254, 0.1);
    border-color: #4facfe;
}

.callout-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.callout-tip {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

/* Hero Image */
.hero-image {
    margin: 0 -1.5rem 2rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Footer */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cream);
}

.back-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Related Posts */
.related-posts {
    padding: 2rem 1.5rem 3rem;
}

.related-posts h3 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: var(--white);
    padding: 1.5rem;
    border-left: 3px solid var(--gold);
    text-decoration: none;
    transition: transform 0.2s ease;
    display: block;
}

.related-card:hover {
    transform: translateY(-2px);
}

.related-card h4 {
    font-size: 1rem;
    color: var(--navy);
    margin: 0.5rem 0;
    font-weight: 600;
}

.related-card .post-category {
    font-size: 0.6875rem;
}

.related-card time {
    font-size: 0.8125rem;
    color: #666;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(26, 39, 68, 0.1);
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--cream);
    background: var(--white);
    color: var(--navy);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover,
.page-btn.active {
    background: var(--navy);
    color: var(--cream);
    border-color: var(--navy);
}

/* States */
.loading-state,
.no-posts {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.error-state {
    text-align: center;
    padding: 4rem 2rem;
}

.error-state h1 {
    color: var(--navy);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.error-state p {
    color: #555;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
    .blog-filters {
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .post-card {
        padding: 1.5rem;
    }

    .post-card h2 {
        font-size: 1.125rem;
    }

    .blog-post {
        padding: 1.5rem 1rem;
    }

    .post-header h1 {
        font-size: 1.5rem;
    }

    .hero-image {
        margin: 0 -1rem 2rem;
    }

    .post-content h2 {
        font-size: 1.25rem;
    }

    .post-content h3 {
        font-size: 1.125rem;
    }

    .post-content blockquote {
        padding: 1rem 1.25rem;
    }
}
