/**
 * FoodBankFinder.Net - Blog Styles
 * Additional styles specific to blog pages
 */

/* Blog Post Content Styling */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.blog-content h2 {
    color: var(--dark-green);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 0.5rem;
}

.blog-content h3 {
    color: var(--dark-green);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1.2rem;
}

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

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content strong {
    color: var(--dark-green);
    font-weight: 600;
}

.blog-content a {
    color: var(--teal-green);
    text-decoration: underline;
}

.blog-content a:hover {
    color: var(--primary-green);
}

.blog-content blockquote {
    border-left: 4px solid var(--primary-green);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    background-color: var(--light-green);
    padding: 1rem 1.5rem;
    border-radius: 0.25rem;
}

.blog-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.blog-content table th {
    background-color: var(--primary-green);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.blog-content table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
}

.blog-content table tr:hover {
    background-color: var(--light-green);
}

.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Blog Card Hover Effects */
.blog-listing .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-listing .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(40, 167, 69, 0.15) !important;
}

/* Blog Post Meta */
.post-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.post-meta i {
    margin-right: 0.25rem;
}

/* Blog Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-green);
    color: white;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.category-badge:hover {
    background-color: var(--hover-green);
    color: white;
    text-decoration: none;
}

/* Breadcrumb Styling */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--teal-green);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Social Sharing Buttons */
.btn-facebook {
    background-color: #1877f2;
    border-color: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background-color: #1565c0;
    border-color: #1565c0;
    color: white;
}

/* Related Posts Section */
.related-posts .card {
    height: 100%;
}

.related-posts .card-title {
    font-size: 1rem;
    line-height: 1.4;
}

/* Sidebar Widgets */
.sidebar .card {
    margin-bottom: 1.5rem;
}

.sidebar .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .list-group-item:hover {
    border-left-color: var(--primary-green);
    background-color: var(--light-green);
}

.sidebar .list-group-item.active {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

/* Search Widget */
.blog-search .input-group {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.blog-search .form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-green);
    border-color: #dee2e6;
}

.page-link:hover {
    background-color: var(--light-green);
    border-color: var(--primary-green);
    color: var(--dark-green);
}

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

.page-item.disabled .page-link {
    background-color: #fff;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Author Box */
.author-box {
    background-color: var(--light-green);
    border-left: 4px solid var(--primary-green);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.author-box h5 {
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
}

/* Blog List View Toggle */
.view-toggle .btn {
    transition: all 0.2s ease;
}

/* Featured Image */
.featured-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* RSS Feed Button */
.rss-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rss-button i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-content {
        font-size: 1rem;
    }

    .blog-content h2 {
        font-size: 1.5rem;
    }

    .blog-content h3 {
        font-size: 1.25rem;
    }

    .sidebar {
        margin-top: 2rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .breadcrumb,
    .social-sharing,
    .related-posts,
    .comments-section {
        display: none;
    }

    .blog-content {
        font-size: 12pt;
        line-height: 1.6;
    }

    .blog-content a {
        color: #000;
        text-decoration: none;
    }

    .blog-content a:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Admin Blog Styles */
.admin-nav {
    background-color: var(--dark-green);
    margin-bottom: 2rem;
}

.admin-stats .card {
    text-align: center;
}

.admin-stats h3 {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.table-actions .btn-group {
    white-space: nowrap;
}

/* Rich Text Editor Preview */
.mce-content-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin-left: -1rem;
    margin-top: -1rem;
    border: 3px solid var(--primary-green);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility Improvements */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .blog-content {
        color: #000;
    }

    .card {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
