/* ========================================
   SINGLE POST / BLOG DETAIL STYLES
   ======================================== */

/* Article Header - Deep Blue Gradient */
.article-header {
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
    padding: 140px 0 80px;
}

.article-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.article-header-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.header-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.header-shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.3);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.header-shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -50px;
    left: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.article-header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    color: #818cf8;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.article-category:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.article-title-gradient {
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 50%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-item svg {
    width: 18px;
    height: 18px;
    color: #818cf8;
}

/* Article Section */
.article-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    position: relative;
    padding: 4rem 0 6rem;
}

.article-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    position: relative;
}

/* Main Content */
.main-content {
    min-width: 0;
}

/* Featured Image */
.featured-image-wrap {
    margin-bottom: 2.5rem;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.featured-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.featured-image-wrap:hover img {
    transform: scale(1.02);
}

/* TL;DR Block */
.tldr-block {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.tldr-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
}

.tldr-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #818cf8;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tldr-label svg {
    width: 16px;
    height: 16px;
}

.tldr-text {
    color: rgba(238, 242, 255, 0.9);
    line-height: 1.7;
    margin: 0;
}

/* Entry Content Styles */
.entry-content {
    color: rgba(238, 242, 255, 0.85);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.entry-content > * + * {
    margin-top: 1.5rem;
}

.entry-content h2 {
    font-size: 1.875rem;
    color: white;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
    position: relative;
}

.entry-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.entry-content h3 {
    font-size: 1.5rem;
    color: #c7d2fe;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.entry-content h4 {
    font-size: 1.25rem;
    color: #a5b4fc;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.entry-content p {
    margin-bottom: 1.25rem;
}

.entry-content a {
    color: #818cf8;
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, 0.4);
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.entry-content a:hover {
    color: #a5b4fc;
    text-decoration-color: #a5b4fc;
}

.entry-content strong {
    color: white;
    font-weight: 600;
}

.entry-content ul,
.entry-content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.entry-content ul li::marker {
    color: #6366f1;
}

.entry-content ol li::marker {
    color: #8b5cf6;
    font-weight: 600;
}

.entry-content blockquote {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 4px solid #6366f1;
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    position: relative;
}

.entry-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: rgba(99, 102, 241, 0.3);
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-family: Georgia, serif;
    line-height: 1;
}

.entry-content blockquote p {
    margin: 0;
    position: relative;
    z-index: 1;
    color: #c7d2fe;
}

.entry-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #818cf8;
    font-style: normal;
}

.entry-content code {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: #c7d2fe;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.5rem 0;
}

.entry-content figure {
    margin: 2rem 0;
}

.entry-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(238, 242, 255, 0.6);
    margin-top: 0.75rem;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.entry-content th {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
}

.entry-content td {
    padding: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    color: rgba(238, 242, 255, 0.85);
}

.entry-content tr:last-child td {
    border-bottom: none;
}

.entry-content tr:nth-child(even) {
    background: rgba(99, 102, 241, 0.05);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.info-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #22d3ee;
    margin-bottom: 0.75rem;
}

.info-box-title svg {
    width: 20px;
    height: 20px;
}

.info-box p {
    margin: 0;
    color: rgba(236, 254, 255, 0.9);
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.warning-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 0.75rem;
}

.warning-box-title svg {
    width: 20px;
    height: 20px;
}

/* Success Box */
.success-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.success-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #34d399;
    margin-bottom: 0.75rem;
}

/* Tags Section */
.tags-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.tags-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(238, 242, 255, 0.6);
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #a5b4fc;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.4);
    color: white;
    transform: translateY(-2px);
}

/* Author Box */
.author-box {
    margin-top: 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: rgba(238, 242, 255, 0.7);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #818cf8;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #a5b4fc;
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
}

.related-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.related-title svg {
    width: 24px;
    height: 24px;
    color: #818cf8;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.related-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.related-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-card-image img {
    transform: scale(1.08);
}

.related-card-content {
    padding: 1.25rem;
}

.related-card-title {
    font-size: 1.125rem;
    line-height: 1.4;
}

.related-card-title a {
    color: #c7d2fe;
    transition: color 0.3s ease;
}

.related-card-title a:hover {
    color: white;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget-title {
    font-size: 1.125rem;
    color: white;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

/* TOC Widget */
.toc-widget {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: rgba(238, 242, 255, 0.7);
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border-left-color: #6366f1;
    padding-left: 1rem;
}

.toc-h3 {
    padding-left: 1.5rem !important;
    font-size: 0.875rem;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    text-align: center;
}

.cta-widget .sidebar-widget-title {
    color: white;
    border-bottom-color: rgba(255,255,255,0.2);
}

.cta-widget p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-widget .btn {
    width: 100%;
    background: white;
    color: #6366f1;
    font-weight: 600;
    padding: 0.875rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cta-widget .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Categories Widget */
.widget-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-categories li {
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.widget-categories li:last-child {
    border-bottom: none;
}

.widget-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: rgba(238, 242, 255, 0.8);
    transition: all 0.3s ease;
}

.widget-categories a:hover {
    color: #a5b4fc;
    padding-left: 0.5rem;
}

.cat-count {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.comments-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 100px 0 60px;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .entry-content {
        font-size: 1rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    .entry-content h3 {
        font-size: 1.25rem;
    }
}
