/* ===================================
   GoalsGuild Blog Page - Styles
   =================================== */

/* Blog Header */
.blog-header {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #154480 100%);
    color: var(--white);
    text-align: center;
}

.blog-header h1 {
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Blog Content */
.blog-content {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Main Content */
.blog-main {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.blog-articles {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Article Card */
.article-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background-color: var(--white);
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-category {
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.article-card h2 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.article-card h2 a {
    color: inherit;
}

.article-card h2 a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    gap: 12px;
}

.read-more svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--text-light);
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn,
.pagination-page {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled),
.pagination-page:hover:not(.active) {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-page.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-dark);
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-list li a {
    display: block;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    color: var(--text-dark);
    transition: var(--transition);
}

.category-list li a:hover,
.category-list li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.recent-post-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-item a {
    color: var(--text-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.recent-post-item a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, #154480 100%);
    color: var(--white);
}

.newsletter-widget h3 {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
}

.newsletter-widget p {
    opacity: 0.9;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.2);
}

.newsletter-form .btn {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-dark);
}

.newsletter-form .btn:hover {
    background-color: #f5a623;
    border-color: #f5a623;
}

/* Blog Post Detail (when viewing full article) */
.blog-post {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.blog-post header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.blog-post h1 {
    margin-bottom: 15px;
}

.blog-post .tags {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.blog-post .tag {
    padding: 6px 14px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-post .content {
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-post .content h2,
.blog-post .content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-post .content p {
    margin-bottom: 1.5rem;
}

.blog-post .content img {
    margin: 2rem 0;
    border-radius: var(--border-radius);
}

.blog-post .content ul,
.blog-post .content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post .content li {
    margin-bottom: 0.5rem;
    list-style: inherit;
}

.blog-post .content code {
    background-color: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.blog-post .content pre {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.blog-post .content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Responsive Design */
@media (max-width: 1023px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: -1;
    }
}

@media (max-width: 767px) {
    .blog-header {
        padding: 60px 0 40px;
    }

    .blog-main {
        padding: 20px;
    }

    .article-card {
        padding: 20px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .blog-post {
        padding: 20px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .sidebar-widget {
        padding: 20px;
    }
}

