/* ============================================
   Blog Shared Stylesheet — terrellflautt.com
   Unified styles for all blog pages
   ============================================ */

:root {
    --blog-accent: #4facfe;
    --blog-accent-alt: #00f2fe;
    --blog-gradient: linear-gradient(45deg, #4facfe, #00f2fe);
    --blog-text: #b8b8b8;
    --blog-text-muted: #888;
    --blog-text-dim: #666;
    --blog-bg-card: rgba(255, 255, 255, 0.05);
    --blog-bg-card-hover: rgba(255, 255, 255, 0.08);
    --blog-border: rgba(255, 255, 255, 0.1);
    --blog-border-hover: rgba(79, 172, 254, 0.4);
    --blog-code-bg: rgba(0, 0, 0, 0.3);
    --blog-width: 800px;
    --blog-width-wide: 900px;
}

/* ---- Global Blog Link Styling ---- */
/* Remove underlines, animated solid underline slides in on hover */
.blog-container a,
.blog-content a,
.article-container a {
    text-decoration: none;
    position: relative;
}

/* Animated solid underline for inline/body links */
.blog-content a:not(.nav-link):not(.nav-logo):not(.back-to-top),
.article-container a:not(.nav-link):not(.nav-logo):not(.back-to-top) {
    transition: color 0.3s ease;
    padding-bottom: 1px;
}

.blog-content a:not(.nav-link):not(.nav-logo):not(.back-to-top)::after,
.article-container a:not(.nav-link):not(.nav-logo):not(.back-to-top)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blog-accent);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-content a:not(.nav-link):not(.nav-logo):not(.back-to-top):hover::after,
.article-container a:not(.nav-link):not(.nav-logo):not(.back-to-top):hover::after {
    width: 100%;
}

/* Product links row — glow on hover */
.blog-container p a[style*="color: #4facfe"],
.category-section p a {
    text-decoration: none !important;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.blog-container p a[style*="color: #4facfe"]:hover,
.category-section p a:hover {
    text-shadow: 0 0 8px rgba(79, 172, 254, 0.5);
}

/* Footer link in blog pages */
.footer-text a {
    text-decoration: none !important;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 2px;
}

.footer-text a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blog-accent);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-text a:hover::after {
    width: 100%;
}

/* ---- Index / Listing Pages ---- */

.blog-container {
    max-width: var(--blog-width-wide);
    margin: 100px auto 50px;
    padding: 20px;
}

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

.blog-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: var(--blog-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    color: var(--blog-text-muted);
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Category sections */
.category-section {
    margin-bottom: 50px;
}

.category-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(79, 172, 254, 0.3);
    color: var(--blog-accent);
}

.section-label {
    color: var(--blog-accent);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

/* Article grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Article cards */
.article-card {
    background: var(--blog-bg-card);
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.article-card:hover {
    transform: translateY(-3px);
    background: var(--blog-bg-card-hover);
    border-color: var(--blog-border-hover);
}

.article-card h3 {
    font-size: 1.15em;
    margin-bottom: 8px;
    color: #fff;
}

.article-card p {
    color: #aaa;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 12px;
}

.article-card a {
    color: var(--blog-accent);
    text-decoration: none;
    font-weight: 500;
}

.article-card a:hover {
    color: var(--blog-accent-alt);
}

.article-title {
    font-size: 1.3em;
    margin-bottom: 8px;
    color: #fff;
}

.article-meta {
    color: var(--blog-text-dim);
    font-size: 0.85em;
    margin-bottom: 12px;
}

.article-excerpt {
    color: #999;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Tags */
.product-tag,
.tag {
    display: inline-block;
    background: rgba(79, 172, 254, 0.15);
    color: var(--blog-accent);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-bottom: 10px;
    margin-right: 4px;
}

/* Featured cards */
.featured {
    border-color: var(--blog-border-hover);
    background: rgba(79, 172, 254, 0.05);
}

.featured .article-title {
    color: var(--blog-accent);
}

/* Read more links */
.read-more {
    color: var(--blog-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--blog-accent-alt);
}

/* Blog links row */
.blog-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.blog-links a {
    color: var(--blog-accent);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.blog-links a:hover {
    background: rgba(79, 172, 254, 0.1);
    border-color: var(--blog-accent);
}

/* Other blogs section */
.other-blogs {
    margin-top: 60px;
    padding: 30px;
    background: var(--blog-bg-card);
    border-radius: 10px;
    text-align: center;
}

.other-blogs h3 {
    color: var(--blog-accent);
    margin-bottom: 15px;
}

/* Daily update box */
.daily-update {
    background: rgba(79, 172, 254, 0.1);
    border-left: 4px solid var(--blog-accent);
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

/* ---- Article Pages ---- */

.blog-content {
    max-width: var(--blog-width);
    margin: 100px auto 50px;
    padding: 2rem;
    line-height: 1.8;
}

.blog-content h1 {
    font-size: 2.2em;
    margin-bottom: 0.5rem;
    background: var(--blog-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-content h2 {
    color: var(--blog-accent);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5em;
    scroll-margin-top: 100px;
}

.blog-content h3 {
    color: var(--blog-accent-alt);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-content p {
    color: var(--blog-text);
    margin-bottom: 1rem;
}

.blog-content a {
    color: var(--blog-accent);
}

.blog-content ul,
.blog-content ol {
    color: var(--blog-text);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

.blog-content strong {
    color: #ddd;
}

/* Blockquotes */
.blog-content blockquote {
    border-left: 3px solid var(--blog-accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #999;
    font-style: italic;
}

/* Magazine-style pull quotes */
.featured-quote {
    font-size: 1.5em;
    line-height: 1.5;
    border: none !important;
    border-left: none !important;
    padding: 2rem 2.5rem;
    margin: 3rem -1rem;
    background: rgba(79, 172, 254, 0.05);
    border-radius: 12px;
    color: #d4d4d4;
    font-style: italic;
    position: relative;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.featured-quote::before {
    content: '\201C';
    position: absolute;
    top: -0.15em;
    left: 0.3em;
    font-size: 4em;
    color: var(--blog-accent);
    font-family: Georgia, 'Times New Roman', serif;
    font-style: normal;
    line-height: 1;
    opacity: 0.4;
}

.featured-quote::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--blog-accent);
    border-radius: 2px;
}

/* Attribution line inside pull quotes */
.featured-quote .quote-attribution {
    display: block;
    font-size: 0.55em;
    color: var(--blog-accent);
    margin-top: 1rem;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Code blocks */
.code-block {
    background: var(--blog-code-bg);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: ui-monospace, 'Courier New', monospace;
    font-size: 0.9em;
    overflow-x: auto;
    color: #ccc;
}

.blog-content pre,
.blog-content code {
    font-family: ui-monospace, 'Courier New', monospace;
}

.blog-content pre {
    background: var(--blog-code-bg);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-size: 0.9em;
    color: #ccc;
}

.blog-content code {
    background: rgba(79, 172, 254, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--blog-accent);
}

.blog-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

/* Challenge / Solution boxes */
.challenge-box {
    background: rgba(255, 59, 48, 0.1);
    border-left: 4px solid #ff3b30;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.solution-box {
    background: rgba(52, 199, 89, 0.1);
    border-left: 4px solid #34c759;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

/* Demo box */
.demo-box {
    background: var(--blog-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

/* Source list */
.source-list {
    background: var(--blog-bg-card);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.source-list h3 {
    color: var(--blog-accent);
    margin-top: 0;
}

.source-list ol {
    font-size: 0.9em;
}

/* Author box */
.author-box {
    background: var(--blog-bg-card);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.author-box h3 {
    color: var(--blog-accent);
    margin-top: 0;
}

/* Related articles */
.related-articles {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.related-articles h3 {
    color: var(--blog-accent);
}

.related-articles a {
    display: block;
    padding: 0.5rem 0;
    color: var(--blog-accent);
    text-decoration: none;
}

.related-articles a:hover {
    color: var(--blog-accent-alt);
}

/* Table of contents */
.toc {
    background: var(--blog-bg-card);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2rem 0 2.5rem;
}

.toc h2 {
    color: var(--blog-accent);
    font-size: 1.1em;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc ol {
    padding-left: 1.2rem;
    margin: 0;
}

.toc li {
    margin-bottom: 0.4rem;
}

.toc a {
    color: var(--blog-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: var(--blog-accent);
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--blog-gradient);
    z-index: 1001;
    transition: width 0.1s linear;
    width: 0%;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(79, 172, 254, 0.15);
    border: 1px solid rgba(79, 172, 254, 0.3);
    color: var(--blog-accent);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 900;
    backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(79, 172, 254, 0.25);
    transform: translateY(-2px);
}

/* ---- Legacy class compatibility ---- */
/* Maps article-container to same styles as blog-content */

.article-container {
    max-width: var(--blog-width);
    margin: 100px auto 50px;
    padding: 2rem;
    line-height: 1.8;
}

.article-container h1,
.article-container .article-title {
    font-size: 2.2em;
    margin-bottom: 0.5rem;
    background: var(--blog-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-container h2 {
    color: var(--blog-accent);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5em;
}

.article-container h3 {
    color: var(--blog-accent-alt);
    margin-top: 1.5rem;
}

.article-container p,
.article-content p {
    color: var(--blog-text);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-container a,
.article-content a {
    color: var(--blog-accent);
}

.article-container ul,
.article-container ol {
    color: var(--blog-text);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-container li {
    margin-bottom: 0.5rem;
}

.article-container blockquote {
    border-left: 3px solid var(--blog-accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #999;
    font-style: italic;
}

.article-meta {
    color: var(--blog-text-muted);
    margin-bottom: 20px;
}

/* ---- Mobile nav toggle script support ---- */
/* Already handled in styles.css via .nav-toggle classes */

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .blog-container {
        margin-top: 80px;
        padding: 15px;
    }

    .blog-title {
        font-size: 1.8em;
    }

    .blog-content {
        margin-top: 80px;
        padding: 1rem;
    }

    .article-container {
        margin-top: 80px;
        padding: 1rem;
    }

    .blog-content h1,
    .article-container h1 {
        font-size: 1.6em;
    }

    .blog-content h2,
    .article-container h2 {
        font-size: 1.3em;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .code-block,
    .blog-content pre {
        font-size: 0.8em;
        padding: 0.75rem;
    }

    .featured-quote {
        font-size: 1.2em;
        padding: 1.5rem 1.25rem;
        margin: 2rem 0;
    }

    .featured-quote::before {
        font-size: 3em;
        left: 0.2em;
    }

    .toc {
        padding: 1rem 1.25rem;
    }

    .blog-links {
        gap: 15px;
    }

    .blog-links a {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .blog-content,
    .article-container {
        padding: 0.75rem;
    }

    .blog-content h1,
    .article-container h1 {
        font-size: 1.4em;
    }

    .article-card {
        padding: 16px;
    }
}
