/* ===== single post styles ===== */
.panda-toc a.is-active {
    border-right: 3px solid #de1e2c;
    color: #de1e2c !important;
    font-weight: 600;
}

.panda-single {
    color: #0f172a;
    line-height: 1.8;
    max-width: 100%;
    overflow-x: hidden;
}

.panda-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.panda-hero-thumb {
    width: 100%;
    height: 100%;
}

.panda-thumb-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    object-fit: contain;
}

.panda-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.panda-categories {
    margin-bottom: 10px;
    font-size: .95rem;
    color: #0ea5e9;
}

.panda-categories span {
    margin: 0 6px;
    color: #9ca3af;
}

.panda-categories a {
    padding-left: 10px;
    border-radius: 6px;
}

.panda-title {
    margin: 0;
    color: #111827;
    font-size: 26px !important;
    line-height: 2em !important;
}

.panda-excerpt {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 20px;
}

.panda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: .9rem;
    color: #6b7280;
}

.panda-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-right: 10px;
}

.panda-meta span:not(:last-child)::after {
    content: "";
    position: absolute;
    left: -10px;
    width: 1px;
    height: 14px;
    background: #d1d5db;
}

.panda-meta i {
    font-size: 12px;
    color: #666;
}

.panda-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.panda-author .author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.panda-author .author-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.panda-author .author-link:hover {
    color: var(--accent-color);
}

/* دیدگاه */
.rtl-votes {
    display: flex;
    gap: 10px;
}

.rtl-votes span {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #555;
}

.rtl-votes span:hover svg {
    color: #0ea5e9;
}

.rtl-votes svg {
    width: 18px;
    height: 18px;
    transition: color .2s;
}

.vote-count {
    font-size: 14px;
}

ul.children {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* بدنه مطلب */
.panda-content {
    padding: 50px 0;
}

.panda-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    max-width: 100%;
}

.panda-sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
}

.panda-toc {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}

.panda-toc h3 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

#panda-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#panda-toc-list li {
    margin-bottom: 6px;
}

#panda-toc-list a {
    color: #444;
    font-size: .95rem;
    text-decoration: none;
    transition: color .3s;
    display: block;
}

.panda-toc a {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    padding: 8px 0;
    margin: 0 -15px;
    padding-right: 15px;
    transition: all .2s ease-in-out;
    color: #374151;
    font-size: .95rem;
}

.panda-toc .toc-number {
    font-weight: 600;
    color: #6b7280;
    margin-left: 8px;
    flex-shrink: 0;
}

.panda-toc a.is-active .toc-number {
    color: #de1e2c;
}

.panda-toc .toc-icon {
    display: inline-flex;
    flex-shrink: 0;
    margin-left: 8px;
}

.panda-toc .toc-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.panda-toc .toc-text {
    flex-grow: 1;
    line-height: 1.5;
}

.panda-share {
    margin: 20px 0 0;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 20px 15px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}

.panda-share p {
    margin-bottom: 20px;
    font-weight: 500;
    color: #0f172a;
}

.panda-share-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px;
}

.panda-share-icons a:hover {
    opacity: .7;
}

.panda-share-icons {
    margin-bottom: 20px;
}

h2.category-title {
    font-weight: 700;
    font-size: 18px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 5px 0;
    font-size: .95rem;
    padding: 8px 0;
}

.comment-form button {
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: background .3s;
}

.comment-form button:hover {
    background: #0284c7;
}

.view-all-btn i {
    line-height: 2px;
    font-size: 16px;
}

.view-all-btn {
    text-decoration: none;
    color: #000;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color .2s;
}

.view-all-btn:hover {
    color: #de1e2c;
}

.swiper-button-next,
.swiper-button-prev {
    color: #e13441;
    width: 30px;
    height: 30px;
    top: 55%;
    font-weight: 900;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
}

.swiper-slide {
    padding: 0 5px;
}

/* واکنش‌گرا */
@media (max-width: 992px) {
    .panda-hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .panda-meta {
        justify-content: center;
    }

    .panda-categories a {
        margin: 5px;
    }

    .panda-categories {
        margin-bottom: 10px;
        font-size: .95rem;
        display: flex;
        justify-content: flex-start;
    }

    .panda-title {
        text-align: right;
    }

    .panda-excerpt {
        text-align: right;
    }

    .panda-meta {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .panda-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .panda-sidebar {
        order: -1;
        margin-bottom: 30px;
        position: static;
        top: auto;
        height: auto;
    }

    .panda-main,
    .panda-toc,
    .panda-share,
    .social-section {
        max-width: 100%;
        overflow-x: hidden;
    }

    .entry-content {
        max-width: 100%;
        overflow-x: auto;
    }

    .entry-content img,
    .entry-content iframe,
    .entry-content video {
        max-width: 100% !important;
        height: auto !important;
    }

    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}