/* Blog Article V3 Styles */
.blog-article-v3 {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
}

.blog-article-v3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(131, 58, 180, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.article-hero {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.article-hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.article-back-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.article-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

.article-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.article-tag {
    background: rgba(0, 255, 157, 0.2);
    color: #00ff9d;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 157, 0.3);
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: rgba(0, 255, 157, 0.3);
    color: #00ff9d;
    transform: translateY(-2px);
}

.article-content-wrapper {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: -2rem auto 3rem;
    max-width: 900px;
    overflow: hidden;
}

.article-featured-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.article-body {
    padding: 3rem;
    color: #ffffff;
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-body h1, .article-body h2, .article-body h3 {
    color: #00ff9d;
    margin: 2rem 0 1rem;
}

.article-body h2 {
    font-size: 1.8rem;
    border-left: 4px solid #00ff9d;
    padding-left: 1rem;
}

.article-body h3 {
    font-size: 1.4rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body blockquote {
    background: rgba(0, 255, 157, 0.1);
    border-left: 4px solid #00ff9d;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

/* Generic pre styling */
.article-body pre {
    background: #1e1e1e; /* VS Code dark theme */
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Code blocks SENZA line numbers (versione pulita) */
.article-body .markdown-pre {
    position: relative;
    background: #1e1e1e; /* VS Code dark */
    border-left: 3px solid #007acc; /* VS Code blue accent */
    padding: 1.5rem;
    overflow-x: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-body .markdown-pre code {
    display: block;
    background: transparent;
    color: #d4d4d4; /* VS Code text color */
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre;
    tab-size: 4;
}

/* Rimuovi stili line-number dal JS se presenti */
.article-body .markdown-pre .line-number {
    display: none !important;
}

.article-body .markdown-pre code.has-line-numbers {
    padding-left: 0 !important;
}

.article-body .markdown-pre .code-line {
    display: block;
}

.article-body .markdown-pre .line-content {
    display: inline;
}

/* Inline code (non dentro pre) */
.article-body code:not(.markdown-code) {
    background: rgba(255, 255, 255, 0.1);
    color: #e96900; /* Arancione VS Code per keywords */
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.related-posts {
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.related-post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-post-card::before {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-post-card:hover::before {
    transform: scaleX(1);
}

.related-post-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.related-post-title {
    color: #00ff9d;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.related-post-title:hover {
    color: #00ff9d;
}

.article-nav-bottom {
    text-align: center;
    margin-top: 3rem;
}

.btn-gradient {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    color: white;
}

.floating-toc {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1rem;
    max-width: 250px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.floating-toc.visible {
    opacity: 1;
}

.floating-toc.stop-at-footer {
    position: absolute;
    bottom: 20px;
    top: auto;
    transform: none;
}

.mobile-toc {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1rem;
    margin: 2rem 0;
    position: sticky;
    top: 80px;
    z-index: 100;
}

@media (max-width: 1200px) {
    .floating-toc {
        display: none;
    }
    
    .mobile-toc {
        display: block;
    }
}

@media (max-width: 768px) {
    .article-content-wrapper {
        margin: -1rem 1rem 2rem;
    }
    
    .article-body {
        padding: 2rem 1.5rem;
    }
    
    .article-hero {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
        min-height: 50vh;
    }
    
    .related-posts {
        padding: 2rem 1.5rem;
    }
    
    .mobile-toc {
        margin: 1rem 0;
        top: 70px;
    }
}

/* Hide any duplicate floating elements */
.floating-share:not(.social-share-component),
#floating-share,
.share-widget:not(.social-share-component),
.floating-action-btn:not(.social-share-component),
.chat-widget.floating,
.notification-widget.floating {
    display: none !important;
}

/* Header numbers styling - numeri negli header con colore primario */
.article-content .header-number {
    color: #00ff9d; /* Primary color */
    font-weight: 700;
    margin-right: 0.3em;
}

/* Liste non ordinate con bullet colorati */
.article-body ul {
    list-style-type: none;
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-body ul li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.5rem;
}

.article-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #00ff9d;
    font-weight: bold;
}

/* Liste ordinate SENZA numerazione automatica */
.article-body ol {
    list-style-type: none;
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-body ol li {
    margin-bottom: 0.5rem;
}
