/* Shared Spring Blog - CSS
 * All classes prefixed with sb- to avoid conflicts
 */

/* ============================================
   Blog Container & Layout
   ============================================ */

.sb-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.sb-blog-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.sb-blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.sb-blog-description {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* ============================================
   Subscribe Box
   ============================================ */

.sb-subscribe-box {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 1.5rem 0 2rem;
    text-align: center;
}

.sb-subscribe-box h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.sb-subscribe-box p {
    color: #64748b;
    margin-bottom: 1.25rem;
}

.sb-subscribe-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sb-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sb-subscribe-btn-medium {
    background-color: #000;
    color: #fff;
}

.sb-subscribe-btn-medium:hover {
    background-color: #333;
}

.sb-subscribe-btn-rss {
    background-color: #f97316;
    color: #fff;
}

.sb-subscribe-btn-rss:hover {
    background-color: #ea580c;
}

/* ============================================
   Social Sharing (Header)
   ============================================ */

.sb-social-share-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sb-social-share-header span {
    color: #6b7280;
    font-size: 0.875rem;
}

.sb-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sb-share-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* ============================================
   Blog Post Cards (Index Page) - Grid Layout
   ============================================ */

.sb-blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.sb-blog-card {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sb-blog-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sb-blog-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.sb-blog-card-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.sb-blog-card-date {
    color: #6b7280;
}

.sb-blog-card-author {
    color: #3b82f6;
    font-weight: 500;
    margin-left: 0.5rem;
}

.sb-blog-card-link {
    text-decoration: none;
}

.sb-blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.sb-blog-card-link:hover .sb-blog-card-title {
    color: #3b82f6;
}

.sb-blog-card-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.sb-blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sb-blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #ecfeff;
    color: #0891b2;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.sb-blog-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.sb-read-more {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.875rem;
}

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

.sb-blog-empty {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    grid-column: 1 / -1;
}

/* ============================================
   Single Post Page
   ============================================ */

.sb-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.sb-post {
    margin-bottom: 3rem;
}

.sb-post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.sb-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.sb-post-date {
    color: #6b7280;
}

.sb-post-author {
    color: #3b82f6;
    font-weight: 500;
}

.sb-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.sb-post-description {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.sb-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   Post Content (Markdown Rendered)
   ============================================ */

.sb-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #111827;
}

.sb-post-content h1,
.sb-post-content h2,
.sb-post-content h3,
.sb-post-content h4,
.sb-post-content h5,
.sb-post-content h6 {
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sb-post-content h1 {
    font-size: 2rem;
}

.sb-post-content h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

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

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

.sb-post-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.sb-post-content a:hover {
    color: #2563eb;
}

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

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

.sb-post-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #6b7280;
    font-style: italic;
}

.sb-post-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.sb-post-content code {
    font-family: 'Monaco', 'Menlo', ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9em;
}

.sb-post-content :not(pre) > code {
    background-color: rgba(59, 130, 246, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    color: #111827;
}

.sb-post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.sb-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.sb-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

.sb-post-content th,
.sb-post-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.sb-post-content th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* ============================================
   Post Navigation
   ============================================ */

.sb-post-nav {
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.sb-post-nav-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.sb-post-nav-link:hover {
    text-decoration: underline;
}

/* ============================================
   Social Sharing
   ============================================ */

.sb-social-sharing {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sb-social-sharing-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.sb-social-sharing-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.sb-social-sharing-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sb-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sb-social-btn:hover {
    transform: translateY(-1px);
}

.sb-social-btn svg {
    flex-shrink: 0;
}

.sb-social-twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.sb-social-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.sb-social-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.sb-social-copy:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #3b82f6;
}

.sb-social-copy.sb-copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.sb-social-medium {
    background-color: #000000;
    color: white;
}

/* ============================================
   Disqus Comments
   ============================================ */

.sb-disqus-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* ============================================
   404 Not Found
   ============================================ */

.sb-not-found-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: center;
}

.sb-not-found-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.sb-not-found-message {
    color: #6b7280;
    margin-bottom: 1rem;
}

.sb-not-found-slug {
    color: #6b7280;
    margin-bottom: 2rem;
}

.sb-not-found-slug code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sb-not-found-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.sb-not-found-link:hover {
    background-color: #1d4ed8;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 640px) {
    .sb-blog-title {
        font-size: 2rem;
    }

    .sb-post-title {
        font-size: 1.75rem;
    }

    .sb-blog-card {
        padding: 1rem;
    }

    .sb-social-sharing {
        flex-direction: column;
        align-items: flex-start;
    }

    .sb-social-sharing-buttons {
        width: 100%;
    }

    .sb-social-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}
