/* ========================================
   Single Article Page - Futuristic Layout with Sidebar
   ======================================== */

/* Article Wave Background Container */
.single-article-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.single-article-background .hero-wave-background {
    width: 200%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    will-change: transform;
}

.single-article-background .wave {
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

.single-article-background .wave-1 {
    animation: article-wave-motion-1 20s linear infinite;
}

.single-article-background .wave-2 {
    animation: article-wave-motion-2 25s linear infinite;
}

.single-article-background .wave-3 {
    animation: article-wave-motion-3 30s linear infinite;
}

@keyframes article-wave-motion-1 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes article-wave-motion-2 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes article-wave-motion-3 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.post-single {
    color: var(--color-text-primary);
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #F4F7FB;
    font-weight: 700;
}

/* Article Meta Information */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(66, 213, 232, 0.1);
    margin-bottom: 2rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Reading Time */
.post-reading-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Featured Image */
.post-featured-image {
    width: 100%;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(66, 213, 232, 0.15);
    background: linear-gradient(135deg, #0D1B2E, #1a3a5c);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ========================================
   Table of Contents
   ======================================== */

.post-toc {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(66, 213, 232, 0.15);
    border-radius: 8px;
}

.post-toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: #F4F7FB;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.post-toc-title::before {
    content: '📑';
    font-size: 1.1rem;
}

.post-toc-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.post-toc-toggle.collapsed {
    transform: rotate(-90deg);
}

.post-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-toc-list li {
    margin: 0.5rem 0;
}

.post-toc-list a {
    color: #42D5E8;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.post-toc-list a:hover {
    color: #F4F7FB;
}

.post-toc-list li.active > a {
    color: #F4F7FB;
    font-weight: 600;
}

/* ========================================
   Article Content
   ======================================== */

.post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #F4F7FB;
    margin: 2rem 0 1rem 0;
    padding-top: 1rem;
}

.post-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 1.5rem 0 0.75rem 0;
}

.post-content h4,
.post-content h5,
.post-content h6 {
    color: #F4F7FB;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
}

/* Links */
.post-content a {
    color: #42D5E8;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.post-content a:hover {
    color: #F4F7FB;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #42D5E8;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(66, 213, 232, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

/* Code Blocks */
.post-content pre {
    background: rgba(13, 27, 46, 0.8);
    border: 1px solid rgba(66, 213, 232, 0.2);
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-content code {
    background: rgba(13, 27, 46, 0.8);
    border: 1px solid rgba(66, 213, 232, 0.2);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #42D5E8;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.post-content table th {
    background: rgba(66, 213, 232, 0.1);
    border: 1px solid rgba(66, 213, 232, 0.2);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #42D5E8;
}

.post-content table td {
    border: 1px solid rgba(66, 213, 232, 0.1);
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.post-content table tr:nth-child(even) {
    background: rgba(66, 213, 232, 0.05);
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(66, 213, 232, 0.15);
}

/* ========================================
   Comments Section
   ======================================== */

.comments-area {
    margin-top: 3rem;
    padding: 2rem;
    border-top: 1px solid rgba(66, 213, 232, 0.1);
}

.comments-area h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #F4F7FB;
    margin-bottom: 1.5rem;
}

.comment-form {
    background: rgba(17, 36, 58, 0.5);
    padding: 1.5rem;
    border: 1px solid rgba(66, 213, 232, 0.15);
    border-radius: 8px;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #F4F7FB;
    font-size: 0.9rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(66, 213, 232, 0.2);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #F4F7FB;
    background: rgba(13, 27, 46, 0.6);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #42D5E8;
    box-shadow: 0 0 0 3px rgba(66, 213, 232, 0.1);
}

.comment-form button {
    background: linear-gradient(135deg, #168BEE, #42D5E8);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.comment-form button:hover {
    box-shadow: 0 0 20px rgba(66, 213, 232, 0.3);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .single-article-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .article-sidebar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .post-header h1 {
        font-size: 1.75rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-content h2 {
        font-size: 1.35rem;
    }

    .post-content h3 {
        font-size: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
