
/* ===============================
   Blog Archive – Digikala Style
================================ */

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.blog-sort {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-sort a {
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-decoration: none;
    color: #444;
    transition: background .2s;
}
.blog-sort a.active,
.blog-sort a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0px 5px 15px 0px rgba(14, 68, 230, 0.42);
}

/* Layout */
.blog-main {
    display: flex;
    gap: 24px;
}
.blog-content-area {
    flex: 1;
}
.blog-sidebar {
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    height: fit-content;
}
.blog-sidebar h3 {
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}
.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
.popular-posts li {
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    padding-bottom: 6px;
}
.popular-posts li a {
    font-size: 13px;
    color: #222;
    text-decoration: none;
    transition: color .2s;
}
.popular-posts li a:hover {
    color: var(--primary);
}

/* Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.blog-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.blog-thumb img {
    width: 100%;
    height: 180px !important;
    object-fit: cover;
}
.blog-content {
    padding: 14px;
}
.blog-category {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 6px;
}
.blog-title {
    font-size: 15px;
    margin: 0 0 6px;
}
.blog-title a {
  transition: color .2s;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.blog-title a:hover {
    color: #333;
}
.blog-meta {
    font-size: 10px;
    color: #777;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.read-time {
    color: #999;
    font-size: 10px;
}

/* Pagination */
.blog-pagination {
    text-align: center;
    margin: 30px 0;
}
.blog-pagination span,
.blog-pagination a {
    padding: 6px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 0 2px;
    font-size: 13px;
}
.blog-pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   Breadcrumb – Digikala Style
================================ */

.breadcrumb {
    color: #777;
    margin-bottom: 14px;
    font-size: 12px;
}

.breadcrumb a {
    color: #555;
    text-decoration: none;
    transition: color .2s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: #999;
}
.archive-title { 
    font-size: 18px;
}
/* ===============================
   Blog Archive Description
================================ */

.archive-description {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 20px;
  background: #fafafa;
  border-radius: 14px;
  font-size: 14px;
  line-height: 2;
  color: #444;
}
/* ===============================
   Blog Sidebar Categories
================================ */

.blog-categories {
    margin-top: 32px;
}

.blog-categories h3 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.category-dropdown {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--primary);
}
/* ===============================
   Blog Sidebar Tags
================================ */

.blog-tags {
    margin-top: 32px;
}

.blog-tags h3 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 11px;
    color: #555;
    text-decoration: none;
    transition: all .2s ease;
}

.tag-item:hover {
    background: var(--primary);
    color: #fff;
}
/* ===============================
   Blog Sidebar - Mobile
================================ */

.sidebar-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    margin: 16px 0;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* Desktop */
.blog-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

/* Mobile */
@media (max-width: 768px) {

    .blog-main {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .blog-sidebar {
        display: none;
        margin-top: 16px;
        padding: 16px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
    }

    .blog-sidebar.active {
        display: block;
        width: 100%;
    }
}

/* ===============================
   Single Post
================================ */


.single-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.single-meta {
    font-size: 11px;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

/* ===============================
   Responsive Featured Image (Single Post)
================================ */
.single-thumb {
    max-width: 830px;
    max-height: 550px;
    margin: 24px auto;
    overflow: hidden;
    border-radius: 12px;
}

.single-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* مخصوص موبایل */
@media (max-width: 768px) {
    .single-thumb {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        margin: 16px 0;
        border-radius: 8px;
    }

    .single-thumb img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

.post-tags a {
    display: inline-block;
    padding: 6px 10px;
    margin: 4px;
    background: #f3f3f3;
    border-radius: 8px;
    font-size: 11px;
}

.post-share {
  margin-top: 20px;
  font-size: 14px;
  padding: 5px;
}

.post-share a {
  margin-left: 4px;
  color: var(--primary);
  background: #f3f3f3;
  border-radius: 8px;
  padding: 6px;
  font-size: 12px;
}


@media (max-width: 768px) {
    .single-layout {
        display: block;
    }
}
/* ===============================
   TOC
================================ */
.toc-wrapper {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 24px 0;
}

.toc-toggle {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}
.toc-toggle::before {
  content: "";
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background-color: var(--primary);
  display: inline-block;
  margin-left: 7px;
  box-shadow: 0px 5px 15px 0px rgba(14, 68, 230, 0.42);
}
#toc {
    display: none;
    margin-top: 12px;
}

#toc.open {
    display: block;
}

#toc ul {
    margin: 0;
    padding-right: 18px;
}

#toc li {
    margin: 6px 0;
    font-size: 12px;
}

#toc li a {
    color: #444;
    text-decoration: none;
}

#toc li a:hover {
    color: var(--primary);
}

/* indentation by level */
.toc-h2 { padding-right: 10px; }
.toc-h3 { padding-right: 20px; }
.toc-h4 { padding-right: 30px; }
.toc-h5 { padding-right: 40px; }
.toc-h6 { padding-right: 50px; }

/* ===============================
   Related Posts
================================ */
.related-posts {
    margin-top: 48px;
}

.related-posts h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.related-posts ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
}

.related-posts li {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    transition: transform .2s;
}

.related-posts li:hover {
    transform: translateY(-4px);
}

.related-posts a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 12px;
}

/* ===============================
   Single Content Typography
   Ultra Shop Optimized
================================ */

.single-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 2;
    color: #222;
}

/* Paragraph */
.single-content p {
    margin: 0 0 20px;
}

/* Headings */
.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6 {
    font-weight: bold;
    line-height: 1.7;
    margin: 36px 0 16px;
    color: #111;
}

/* Heading sizes (Desktop) */
.single-content h1 { font-size: 17px; }
.single-content h2 { font-size: 16px; }
.single-content h3 { font-size: 15px; }
.single-content h4 { font-size: 15px; }
.single-content h5 { font-size: 15px; }
.single-content h6 { font-size: 15px; }


/* Lists */
.single-content ul,
.single-content ol {
    padding-right: 22px;
    margin: 0 0 20px;
}

.single-content li {
    margin-bottom: 8px;
}

/* Links */
.single-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.single-content a:hover {
    text-decoration: underline;
}

/* Blockquote */
.single-content blockquote {
    margin: 28px 0;
    padding: 16px 20px;
    background: #f8f8f8;
    border-right: 4px solid var(--primary);
    border-radius: 8px;
    font-style: normal;
}

/* Tables */
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.single-content th,
.single-content td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: right;
}

.single-content th {
    background: #fafafa;
    font-weight: 700;
}

/* Code */
.single-content code {
    background: #f3f3f3;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 13px;
}

.single-content pre {
    background: #111;
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.8;
    margin: 24px 0;
}

/* ===============================
   Mobile Optimization
================================ */

@media (max-width: 768px) {

    .single-content {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.9;
    }

    .single-content h1 { font-size: 17px; }
    .single-content h2 { font-size: 16px; }
    .single-content h3 { font-size: 15px; }
    .single-content h4 { font-size: 15px; }
    .single-content h5 { font-size: 15px; }
    .single-content h6 { font-size: 15px; }

    .single-content blockquote {
        padding: 14px;
    }
}
/* =========================================================
✅ UNIFIED COMMENTS STYLE (Blog + Single)
========================================================= */

/* ✅ Wrapper */
.comments-area,
.blog-comments,
.archive-comments {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

/* ✅ Title */
.comments-title,
.blog-comments-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #222;
}

/* ✅ List Reset */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ✅ Single Comment Card */
.comment {
    position: relative;
    padding: 20px 20px 18px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

/* ✅ Author */
.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}
.comment-author a {
  font-style: initial;
}

/* ✅ Date */
.comment-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

/* ✅ Content */
.comment-list p {
  font-size: 14px;
  line-height: 2;
  color: #374151;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* ✅ Reply */
.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* ✅ Nested */
.comment .children {
    margin-top: 16px;
    padding-right: 16px;
    border-right: 2px solid #f0f0f0;
    list-style: none;
}

.comment .children .comment {
    background: #fafafa;
    border-color: #eaeaea;
}

/* =========================================================
✅ COMMENT FORM – SAME EVERYWHERE
========================================================= */

.comment-respond {
    margin-top: 40px;
}

.comment-reply-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #222;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 14px;
}

.comment-form-comment {
    grid-column: 1 / -1;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 12px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    outline: none;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(10,88,202,.08);
}

/* ✅ Submit */
.comment-form .form-submit {
    grid-column: 1 / -1;
}

.comment-form .form-submit input {
 border: none;
}
.comment-reply-title a {
    color: var(--primary);
}

/* =========================================================
✅ Mobile Optimization
========================================================= */

@media (max-width: 768px) {

    .comment {
        padding: 16px;
    }

    .comment-form {
        grid-template-columns: 1fr;
    }

    .comments-title {
        font-size: 16px;
    }
}
/* ===============================
   Single page
================================ */

.page-inner-content {
    font-size: 14px;
    line-height: 2;
    color: #222;
}

.page-inner-content strong {
  font-weight: 600;
}

/* Heading sizes (Desktop) */
.page-inner-content h1 { font-size: 18px; }
.page-inner-content h2 { font-size: 17px; }
.page-inner-content h3 { font-size: 15px; }
.page-inner-content h4 { font-size: 15px; }
.page-inner-content h5 { font-size: 15px; }
.page-inner-content h6 { font-size: 15px; }


/* Blockquote */
.page-inner-content blockquote {
    margin: 28px 0;
    padding: 16px 20px;
    background: #f8f8f8;
    border-right: 4px solid var(--primary);
    border-radius: 8px;
    font-style: normal;
}

/* ===============================
   Mobile Optimization
================================ */

@media (max-width: 768px) {

    .page-inner-content {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.9;
    }

    .page-inner-content h1 { font-size: 18px; }
    .page-inner-content h2 { font-size: 17px; }
    .page-inner-content h3 { font-size: 15px; }
    .page-inner-content h4 { font-size: 15px; }
    .page-inner-content h5 { font-size: 15px; }
    .page-inner-content h6 { font-size: 15px; }

    .page-inner-content blockquote {
        padding: 14px;
    }
}


.blog-sidebar h3::before {
  content: "";
  width: 4px;
  height: 10px;
  border-radius: 2px;

  background-color: var(--primary);
  display: inline-block;
  margin-left: 7px;
  box-shadow: 0px 5px 15px 0px rgba(14, 68, 230, 0.42);
}