/* ============================================
   SINGLE POST STYLES - صفحه تک مقاله
   ============================================ */

/* Breadcrumb Navigation */
.single-post-header .breadcrumb-nav {
    margin-bottom: 2rem;
    text-align: right;
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0.8rem 1.5rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    display: none;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-right: 0.5rem;
    color: var(--text-muted);
    font-size: 1.4rem;
}

@media (max-width: 768px) {
    .breadcrumb {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
        gap: 0.3rem;
    }
    
    .breadcrumb-item {
        font-size: 1.1rem;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin-right: 0.3rem;
    }
}

.single-post-header {
    padding: 6rem 0 3rem;
    text-align: center;
}

.post-category-badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: var(--spotify-black);
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.post-title {
    font-size: clamp(3.2rem, 5vw, 5.6rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 2.4rem;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.post-meta-icon {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* تصویر شاخص */
.post-featured-image {
    margin-bottom: 5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* نوار پیشرفت خواندن */
.reading-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-color);
    z-index: 999;
    transition: width 0.1s ease;
}

/* محتوای مقاله */
.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
    position: relative;
}

@media (min-width: 1024px) {
    .post-content-wrapper {
        grid-template-columns: 250px 1fr;
        align-items: start;
        min-height: 100vh;
    }
}

/* جدول محتوا (Table of Contents) */
.table-of-contents {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    align-self: start;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 10;
}

.table-of-contents::-webkit-scrollbar {
    width: 6px;
}

.table-of-contents::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.table-of-contents::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.table-of-contents::-webkit-scrollbar-thumb:hover {
    background: var(--spotify-green);
}

.table-of-contents h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 1rem;
}

.toc-list li a {
    color: var(--text-secondary);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
    border-right: 3px solid transparent;
    padding-right: 1rem;
}

.toc-list li a:hover,
.toc-list li a.active {
    color: var(--primary-color);
    border-right-color: var(--primary-color);
    padding-right: 1.5rem;
}

/* محتوای اصلی مقاله */
.post-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 5rem;
    box-shadow: var(--shadow-md);
}

.post-content h2 {
    font-size: clamp(2.6rem, 3vw, 3.6rem);
    font-weight: 700;
    margin: 4rem 0 2rem;
    color: var(--text-primary);
    scroll-margin-top: calc(var(--header-height) + 2rem);
}

.post-content h3 {
    font-size: clamp(2.2rem, 2.5vw, 2.8rem);
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    color: var(--text-primary);
    scroll-margin-top: calc(var(--header-height) + 2rem);
}

.post-content h4 {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-primary);
}

.post-content p {
    font-size: 1.8rem;
    line-height: 2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.post-content ul,
.post-content ol {
    margin: 2.5rem 0;
    padding-right: 3rem;
}

.post-content li {
    font-size: 1.8rem;
    line-height: 1.9;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 3rem 0;
    box-shadow: var(--shadow-md);
}

.post-content blockquote {
    border-right: 4px solid var(--primary-color);
    padding: 2.5rem 3rem;
    margin: 3rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-style: italic;
    font-size: 1.9rem;
    color: var(--text-secondary);
}

.post-content code {
    background: var(--bg-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    color: var(--primary-color);
}

.post-content pre {
    background: var(--bg-dark);
    color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 3rem 0;
}

.post-content pre code {
    background: none;
    color: #fff;
    padding: 0;
}

/* باکس‌های اطلاعاتی */
.info-box {
    background: rgba(6, 130, 180, 0.1);
    border-right: 4px solid var(--primary-color);
    padding: 2.5rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.info-box h4 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.warning-box {
    background: rgba(255, 193, 7, 0.1);
    border-right-color: #ffc107;
}

.success-box {
    background: rgba(29, 185, 84, 0.1);
    border-right-color: var(--secondary-color);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 4rem 0;
    box-shadow: var(--shadow-lg);
}

.cta-box h3 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
}

.cta-box .btn {
    background: white;
    color: var(--primary-color);
    font-weight: 700;
}

.cta-box .btn:hover {
    background: var(--secondary-color);
    color: white;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 4rem 0;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.post-tag {
    padding: 0.8rem 1.6rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* دکمه‌های اشتراک‌گذاری */
.social-share-buttons {
    margin: 5rem 0;
    padding: 3.5rem;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.share-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.share-title svg {
    color: var(--primary-color);
}

.share-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.share-btn span {
    position: relative;
    z-index: 1;
}

.share-btn svg {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.share-btn:hover::before {
    opacity: 1;
}

.share-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.share-btn.telegram:hover {
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
}

.share-btn.x-twitter {
    background: linear-gradient(135deg, #000000, #1a1a1a);
}

.share-btn.x-twitter:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #1ea952);
}

.share-btn.whatsapp:hover {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.share-btn.linkedin {
    background: linear-gradient(135deg, #0077b5, #005582);
}

.share-btn.linkedin:hover {
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

/* موبایل */
@media (max-width: 768px) {
    .share-btn {
        padding: 1rem 1.5rem;
        font-size: 1.3rem;
        gap: 0.6rem;
    }
    
    .share-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* نویسنده */
.author-box {
    display: flex;
    gap: 2.5rem;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin: 4rem 0;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.author-info h4 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.author-bio {
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* پست‌های مرتبط */
.related-posts {
    margin-top: 6rem;
    padding-top: 6rem;
    border-top: 2px solid var(--border-color);
}

.related-posts h3 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

/* دیدگاه‌ها */
.comments-wrapper {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border-radius: 16px;
    padding: 4rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.comments-area {
    margin: 0;
    padding: 0;
}

.comments-title {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.comment {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.comment:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.1);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.comment-author .fn {
    color: var(--text-primary);
    font-size: 1.7rem;
    font-weight: 600;
}

.comment-metadata {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.comment-content {
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--text-primary);
    padding-right: 6.5rem;
}

.comment-content p {
    margin-bottom: 1rem;
}

/* فرم دیدگاه */
.comment-respond {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.comment-reply-title {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 2rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 1.4rem 1.6rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    margin-top: 2rem;
}

.form-submit .submit {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #000;
    font-size: 1.6rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}

.form-submit .submit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.4);
}

.form-submit .submit:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .post-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .table-of-contents {
        position: relative;
        top: 0;
        margin-bottom: 3rem;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .post-content {
        padding: 3rem 2rem;
    }
    
    .single-post-header {
        padding: 4rem 0 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Comments mobile */
    .comments-wrapper {
        padding: 2.5rem;
    }
    
    .comment {
        padding: 2rem;
    }
    
    .comment-content {
        padding-right: 0;
    }
    
    .comment-respond {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 2.8rem;
    }
    
    .post-content {
        padding: 2rem 1.5rem;
    }
    
    .post-content h2 {
        font-size: 2.4rem;
    }
    
    .post-content h3 {
        font-size: 2rem;
    }
}

/* ============================================
   COMMENTS SECTION - Spotify Style
   ============================================ */

/* Comments Title */
.comments-area {
    margin-top: 6rem;
}

.comments-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 4rem 0;
}

.comment {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: background 0.2s ease;
}

.comment:hover {
    background: var(--bg-hover);
}

/* Comment Author */
.comment-author {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.comment-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.comment-author .fn {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    font-style: normal;
}

.comment-metadata {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.comment-metadata a {
    color: var(--text-secondary);
}

.comment-metadata a:hover {
    color: var(--primary-color);
}

/* Comment Content */
.comment-content {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.comment-content p {
    margin-bottom: 1rem;
}

/* Reply Link */
.reply {
    margin-top: 1.5rem;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--text-secondary);
    border-radius: 500px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.04);
}

/* Nested Comments */
.children {
    list-style: none;
    padding-right: 3rem;
    margin-top: 2rem;
}

/* Comment Form */
.comment-respond {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-top: 4rem;
}

.comment-reply-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.comment-reply-title small {
    font-size: 1.4rem;
    font-weight: 400;
}

.comment-reply-title small a {
    color: var(--primary-color);
}

/* Form Fields */
.comment-form p {
    margin-bottom: 2rem;
}

.comment-form label {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 1.2rem 1.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-family: var(--font-primary);
    transition: all 0.2s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Submit Button */
.comment-form .form-submit {
    margin-bottom: 0;
}

.comment-form input[type="submit"] {
    display: inline-block;
    padding: 1.2rem 3.2rem;
    background: var(--primary-color);
    color: var(--spotify-black);
    border: none;
    border-radius: 500px;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-form input[type="submit"]:hover {
    background: var(--primary-hover);
    transform: scale(1.04);
}

.comment-form input[type="submit"]:active {
    background: var(--primary-active);
    transform: scale(1);
}

/* Logged In Message */
.comment-form .logged-in-as {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.comment-form .logged-in-as a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Comment Notes */
.comment-notes {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Allowed Tags */
.form-allowed-tags {
    display: none;
}

/* Cookie Consent Checkbox */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 0.2rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.comment-form-cookies-consent label {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    cursor: pointer;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .children {
        padding-right: 2rem;
    }
    
    .comment-respond {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .children {
        padding-right: 1rem;
    }
    
    .comment-respond {
        padding: 1.5rem;
    }
    
    .comment {
        padding: 1.5rem;
    }
}
