/* Blog-specific styles */

/* Blog Layout */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-header h1 {
    color: var(--navy);
    margin-bottom: 16px;
}

.blog-header p {
    font-size: 20px;
    color: var(--ui-dark-grey);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--ui-dark-grey);
}

.blog-card-category {
    background: var(--powder-blue);
    color: var(--dark-blue);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.blog-card h2 {
    font-size: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-card h2 a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card h2 a:hover {
    color: var(--dark-blue);
}

.blog-card-excerpt {
    color: var(--text-black);
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 12px;
}

.read-more::after {
    content: "→";
}

/* Blog Post Styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.blog-post-header {
    margin-bottom: 40px;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--ui-dark-grey);
}

.blog-post-title {
    font-size: 42px;
    color: var(--navy);
    margin-bottom: 20px;
    line-height: 1.2;
}

.blog-post-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 40px;
}

.blog-post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-black);
}

.blog-post-content h2 {
    font-size: 28px;
    color: var(--navy);
    margin: 32px 0 16px;
}

.blog-post-content h3 {
    font-size: 22px;
    color: var(--navy);
    margin: 24px 0 12px;
}

.blog-post-content p {
    margin-bottom: 20px;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.blog-post-content li {
    margin-bottom: 10px;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--sky-blue);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--ui-dark-grey);
}

/* Author Box */
.author-box {
    background: var(--ui-light-grey);
    border-radius: 12px;
    padding: 24px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    margin-bottom: 8px;
}

.author-bio {
    color: var(--ui-dark-grey);
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--ui-grey);
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 30px;
}

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

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--ui-grey);
    border-bottom: 1px solid var(--ui-grey);
}

.social-share h3 {
    margin: 0;
    font-size: 18px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ui-light-grey);
    color: var(--navy);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.share-button:hover {
    background: var(--dark-blue);
    color: var(--white);
}

/* Categories Sidebar */
.blog-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    margin-bottom: 16px;
    color: var(--navy);
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    color: var(--text-black);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: var(--dark-blue);
}

.category-count {
    background: var(--ui-light-grey);
    color: var(--ui-dark-grey);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
}

/* Blog Layout with Sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.blog-main {
    min-width: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--white);
    color: var(--text-black);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background: var(--dark-blue);
    color: var(--white);
}

.pagination .current {
    background: var(--dark-blue);
    color: var(--white);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search Box */
.blog-search {
    position: relative;
    margin-bottom: 24px;
}

.blog-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--ui-grey);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.blog-search input:focus {
    outline: none;
    border-color: var(--dark-blue);
}

.blog-search::before {
    content: "🔍";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post-title {
        font-size: 32px;
    }
    
    .blog-post-content {
        font-size: 16px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* Loading State */
.blog-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--ui-dark-grey);
}

.blog-loading::after {
    content: "...";
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ui-dark-grey);
}

.blog-empty h2 {
    color: var(--navy);
    margin-bottom: 16px;
}

/* Back to Blog Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: gap 0.3s ease;
}

.back-to-blog:hover {
    gap: 12px;
}

.back-to-blog::before {
    content: "←";
}