/* ============================================
   USER-FRIENDLY ENHANCEMENTS
   ============================================ */

/* Breadcrumbs Navigation */
.breadcrumbs {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-item a:hover {
    color: var(--signature-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 10px;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 768px) {
    .breadcrumbs {
        font-size: 13px;
        padding: 12px 0;
    }
    
    .breadcrumb-list {
        gap: 6px;
    }
    
    .breadcrumb-separator {
        font-size: 9px;
    }
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: relative;
    background: transparent;
    border: 2px solid currentColor;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(20deg);
}

.theme-toggle i {
    font-size: 18px;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: inline-block;
}

[data-theme="light"] .theme-toggle .fa-sun,
[data-theme=""] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .fa-moon,
[data-theme=""] .theme-toggle .fa-moon {
    display: inline-block;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--signature-hover);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--signature-color));
    z-index: 999;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5), 0 0 20px rgba(52, 152, 219, 0.3);
}

.reading-progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 8px;
    height: 8px;
    background: var(--signature-color);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.8);
}

/* Reading Time Indicator */
.reading-time,
.entry-meta .reading-time {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-right: 0;
}

.reading-time i {
    font-size: 14px;
}


/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.social-share-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 10px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

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

.share-facebook {
    background: #4267B2;
}

.share-linkedin {
    background: #0077B5;
}

.share-reddit {
    background: #FF4500;
}

.share-email {
    background: var(--text-secondary);
}

.share-copy {
    background: var(--accent-color);
    cursor: pointer;
    border: none;
}

.share-copy.copied {
    background: #27ae60;
}

/* Table of Contents */
.table-of-contents {
    background: var(--secondary-bg);
    border-left: 4px solid var(--accent-color);
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 4px;
}

/* Hide mobile ToC wrapper on desktop */
.mobile-toc-wrapper {
    display: none;
}

/* ToC in sidebar */
.sidebar .table-of-contents {
    background: transparent;
    border-left: none;
    padding: 25px;
    margin: 0;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents ul ul {
    padding-left: 20px;
    margin-top: 5px;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 3px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.table-of-contents a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.table-of-contents a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Highlight active ToC item */
.table-of-contents a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Enhanced Code Blocks */
.entry-content pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 4px;
    position: relative;
}

.entry-content code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
}

.entry-content pre code {
    background: transparent;
    padding: 0;
    border: none;
}

.code-copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

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

.code-copy-button:hover {
    background: var(--signature-hover);
    transform: translateY(-2px);
}

/* Lazy Loading Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print Styles */
@media print {
    .main-navigation,
    .social-share,
    .back-to-top,
    .theme-toggle,
    .reading-progress,
    .hero-section,
    .page-header-section,
    .site-footer,
    .post-navigation,
    .comment-respond,
    .comments-area {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .entry-content {
        max-width: 100%;
    }
    
    .entry-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    pre {
        white-space: pre-wrap;
        word-wrap: break-word;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .social-share {
        justify-content: center;
    }
    
    .table-of-contents {
        padding: 15px 20px;
    }
    
    /* Show mobile ToC on mobile */
    .mobile-toc-wrapper {
        display: block;
    }
    
    /* Hide sidebar ToC widget on mobile since we show mobile ToC in content */
    .sidebar .toc-widget {
        display: none;
    }
}

/* ============================================
   SEARCH RESULTS PAGE STYLING
   ============================================ */

.search-header {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.search-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.search-query {
    color: var(--accent-color);
    font-style: italic;
}

.search-count {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 30px;
}

.search-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 8px;
    background: var(--primary-bg);
    padding: 6px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.search-field {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-field:focus {
    outline: none;
}

.search-submit {
    padding: 10px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-submit:hover {
    background: var(--signature-hover);
}

/* Search Results List */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.search-result-item {
    display: flex;
    gap: 25px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.search-result-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .search-result-thumbnail img {
    transform: scale(1.05);
}

.search-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-result-header {
    margin-bottom: 15px;
}

.search-result-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.search-result-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-result-title a:hover {
    color: var(--accent-color);
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.search-result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-result-meta i {
    color: var(--accent-color);
}

.search-result-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.search-result-categories a {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--accent-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-result-categories a:hover {
    background: var(--signature-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.search-result-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.search-result-footer {
    margin-top: auto;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.read-more-link:hover {
    color: var(--signature-color);
    gap: 12px;
}

.read-more-link i {
    transition: transform 0.2s ease;
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/* No Results Styling */
.no-search-results {
    text-align: center;
    padding: 60px 40px;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-search-results h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.no-search-results p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.search-suggestions {
    max-width: 500px;
    margin: 30px auto;
    text-align: left;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.search-suggestions h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 25px;
}

.search-suggestions li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.recent-posts-section {
    margin-top: 50px;
}

.recent-posts-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.recent-post-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.recent-post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.recent-post-thumbnail {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-card:hover .recent-post-thumbnail img {
    transform: scale(1.1);
}

.recent-post-card h4 {
    padding: 15px;
    margin: 0;
    font-size: 1.1rem;
}

.recent-post-card h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.recent-post-card h4 a:hover {
    color: var(--accent-color);
}

.recent-post-date {
    display: block;
    padding: 0 15px 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive Search Results */
@media (max-width: 768px) {
    .search-header {
        padding: 30px 20px;
    }
    
    .search-title {
        font-size: 1.5rem;
    }
    
    .search-form {
        flex-direction: column;
        border-radius: 12px;
        gap: 0;
    }
    
    .search-field {
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    
    .search-submit {
        border-radius: 0 0 12px 12px;
        justify-content: center;
    }
    
    .search-result-item {
        flex-direction: column;
        padding: 20px;
    }
    
    .search-result-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .search-result-title {
        font-size: 1.3rem;
    }
    
    .recent-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .no-search-results {
        padding: 40px 20px;
    }
}

/* ============================================
   POST TAGS STYLING
   ============================================ */

.post-tags {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 25px 0;
    border-top: 2px solid var(--border-color);
    margin-top: 40px;
}

.post-tags > i {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 5px;
}

.tags-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 5px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tag-badge i {
    font-size: 0.8rem;
    color: var(--accent-color);
}

.tag-badge:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.tag-badge:hover i {
    color: white;
}

/* ============================================
   AUTHOR BIO BOX
   ============================================ */

.author-bio-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    margin-top: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.author-bio-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-name i {
    color: var(--accent-color);
}

.author-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.author-website {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.author-website:hover {
    background: var(--signature-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ============================================
   RELATED POSTS SECTION
   ============================================ */

.related-posts-section {
    margin-top: 50px;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.related-posts-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.related-posts-title i {
    color: var(--accent-color);
}

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

.related-post-card {
    background: var(--primary-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.related-post-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-thumbnail img {
    transform: scale(1.1);
}

.related-post-content {
    padding: 20px;
}

.related-post-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.related-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-post-title a:hover {
    color: var(--accent-color);
}

.related-post-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.related-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-post-meta i {
    color: var(--accent-color);
}

.related-post-meta .post-date {
    color: #666;
}

.related-post-meta .post-views {
    color: #3498db;
    font-weight: 500;
}

.related-post-meta .post-reactions {
    color: #e91e63;
    font-weight: 600;
}

.related-post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE CONTENT FEATURES
   ============================================ */

@media (max-width: 768px) {
    .post-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .author-bio-box {
        padding: 25px;
        margin-top: 30px;
    }
    
    .author-bio-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .author-name {
        justify-content: center;
        font-size: 1.3rem;
    }
    
    .related-posts-section {
        padding: 25px;
        margin-top: 30px;
    }
    
    .related-posts-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tag-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* ============================================
   LOADING ANIMATIONS & TRANSITIONS
   ============================================ */

/* Fade in animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton loading animation */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--card-bg) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        var(--card-bg) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* Fade in content on page load */
.blog-post,
.content-section,
.search-result-item,
.related-post-card {
    animation: fadeIn 0.6s ease-out;
}

/* Stagger animations for grid items */
.blog-grid .blog-post:nth-child(1) { animation-delay: 0.1s; }
.blog-grid .blog-post:nth-child(2) { animation-delay: 0.2s; }
.blog-grid .blog-post:nth-child(3) { animation-delay: 0.3s; }
.blog-grid .blog-post:nth-child(4) { animation-delay: 0.4s; }
.blog-grid .blog-post:nth-child(5) { animation-delay: 0.5s; }
.blog-grid .blog-post:nth-child(6) { animation-delay: 0.6s; }

/* Pulse animation for buttons on hover */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ============================================
   IMAGE LAZY LOADING ENHANCEMENTS
   ============================================ */

img[loading="lazy"] {
    transition: opacity 0.3s ease-in;
}

img.lazy-loading {
    opacity: 0.3;
    filter: blur(5px);
}

img.lazy-loaded {
    opacity: 1;
    filter: blur(0);
}

/* Placeholder for images while loading */
.img-placeholder {
    background: linear-gradient(
        90deg,
        var(--card-bg) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        var(--card-bg) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    min-height: 200px;
}

/* ============================================
   FEATURED/STICKY POST STYLING
   ============================================ */

.sticky {
    position: relative;
    border: 2px solid var(--accent-color);
    background: linear-gradient(
        135deg,
        var(--primary-bg) 0%,
        rgba(52, 152, 219, 0.05) 100%
    );
}

.sticky::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--signature-color));
}

.sticky::after {
    content: 'Featured';
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
    z-index: 10;
}

.sticky:hover {
    border-color: var(--signature-hover);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.3);
}

/* Featured post title styling */
.sticky .entry-title a {
    background: linear-gradient(90deg, var(--accent-color), var(--signature-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   CUSTOM 404 PAGE STYLING
   ============================================ */

.error-404 {
    padding: 60px 20px;
}

.error-404-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.error-404-icon {
    color: var(--accent-color);
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

.error-404-icon svg {
    width: 180px;
    height: 180px;
    opacity: 0.9;
}

.error-404-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.error-404-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

.error-404-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    animation: fadeIn 0.6s ease-out 0.4s backwards;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.button-primary {
    background: var(--accent-color);
    color: white;
}

.button-primary:hover {
    background: var(--signature-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.button-secondary {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.button-secondary:hover {
    background: var(--accent-color);
    color: white;
}

.error-404-search {
    margin: 50px 0;
    animation: fadeIn 0.6s ease-out 0.5s backwards;
}

.error-404-search h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.error-404-recent-posts {
    margin-top: 60px;
    animation: fadeIn 0.6s ease-out 0.6s backwards;
}

.error-404-recent-posts h3 {
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* ============================================
   ARCHIVE HEADERS WITH DESCRIPTIONS
   ============================================ */

.archive-header {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(52, 152, 219, 0.05) 100%);
    padding: 50px 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.archive-title i {
    color: var(--accent-color);
    font-size: 2rem;
}

.archive-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 20px;
}

.archive-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.archive-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-meta i {
    color: var(--accent-color);
}

/* ============================================
   RESPONSIVE VISUAL ENHANCEMENTS
   ============================================ */

@media (max-width: 768px) {
    .error-404-title {
        font-size: 2rem;
    }
    
    .error-404-message {
        font-size: 1rem;
    }
    
    .error-404-actions {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
        justify-content: center;
    }
    
    .archive-header {
        padding: 30px 20px;
    }
    
    .archive-title {
        font-size: 1.8rem;
        flex-direction: column;
    }
    
    .archive-description {
        font-size: 1rem;
    }
    
    .sticky::after {
        top: 10px;
        right: 10px;
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}
