/* =================================================================
   BLOG POST ENHANCEMENTS - WIK Technologies
   ================================================================= */

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-red), var(--secondary-blue));
    z-index: 1001;
    transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Blog Article Container */
article {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 5%;
}

/* Enhanced Blog Typography */
article h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 900;
    line-height: 1.2;
}

article h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    position: relative;
    padding-left: 1.5rem;
}

article h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-red), var(--secondary-blue));
    border-radius: 2px;
}

article h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

article p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

article ul,
article ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

article li {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

/* Enhanced Quote Callouts */
article blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background: var(--light-gray);
    border-left: 4px solid var(--accent-red);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

article blockquote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-red);
    animation: quoteGrow 0.6s ease forwards;
}

@keyframes quoteGrow {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

article blockquote p {
    font-style: italic;
    color: var(--text-gray);
    margin: 0;
}

/* Code Blocks Enhancement */
article pre {
    background: #1E293B;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

article code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #E5E7EB;
}

article pre code {
    display: block;
    line-height: 1.6;
}

/* Inline code */
article p code,
article li code {
    background: var(--light-gray);
    color: var(--accent-red);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Copy Code Button */
.copy-code-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
}

article pre:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

/* Reading Time Badge */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.reading-time i {
    color: var(--secondary-blue);
}

/* Enhanced Links in Blog Posts */
article a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}

article a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s;
}

article a:hover {
    color: var(--accent-red);
}

article a:hover::after {
    width: 100%;
}

/* Image Captions */
article figure {
    margin: 2.5rem 0;
}

article figcaption {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-gray);
    font-style: italic;
    margin-top: 0.75rem;
}

/* Highlighted Text */
article mark {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(220, 38, 38, 0.2));
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    color: var(--dark);
}

/* Drop Cap (First Letter) */
article p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
}

/* Social Share Buttons */
.social-share {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
}

.social-share.visible {
    opacity: 1;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.share-btn:hover {
    transform: translateX(-5px) scale(1.1);
}

.share-twitter {
    background: #1DA1F2;
}

.share-facebook {
    background: #1877F2;
}

.share-linkedin {
    background: #0A66C2;
}

.share-copy {
    background: var(--text-gray);
}

/* Author Bio Section */
.author-bio {
    margin-top: 4rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--light-gray), #E5E7EB);
    border-radius: 16px;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.2);
}

.author-info h4 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.author-info p {
    color: var(--text-gray);
    margin: 0;
    font-size: 1rem;
}

/* Responsive Blog Enhancements */
@media (max-width: 1024px) {
    .social-share {
        display: none;
    }
}

@media (max-width: 768px) {
    article h1 {
        font-size: 2rem;
    }
    
    article h2 {
        font-size: 1.5rem;
    }
    
    article p,
    article li {
        font-size: 1rem;
    }
    
    article p:first-of-type::first-letter {
        font-size: 2.5rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
}
