/* Farsisaz blog — archive + single post.
   Only what output.css doesn't already provide; values copied from existing
   theme components (tab buttons, hero slide, product-description-content).
   Loaded site-wide because the header mini menu shows the latest posts. */

.fs-blog-ico { color: #fff; }
.dark .fs-blog-ico { color: #000; }

/* search field inside the sort/filter pill */
.fs-blog-search {
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    color: #000;
    width: 210px;
}
.fs-blog-search::placeholder { color: #00000066; }
.dark .fs-blog-search { color: #fff; }
.dark .fs-blog-search::placeholder { color: #FFFFFF66; }
.fs-blog-search::-webkit-search-cancel-button { display: none; }

/* category chips = product page .tab-button */
.fs-blog-cats {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 40px;
    padding-bottom: 4px;
}
.fs-blog-cats::-webkit-scrollbar { display: none; }
.fs-blog-cat {
    flex-shrink: 0;
    border-radius: 0.875rem;
    border: 1px solid #000;
    box-shadow: 0 2px 0 0 #000;
    padding: 0.5rem 1rem;
    font-size: 13px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}
.fs-blog-cat:hover,
.fs-blog-cat.is-active { background: #000; color: #fff; }
.dark .fs-blog-cat { border-color: #fff; box-shadow: 0 2px 0 0 #fff; color: #fff; }
.dark .fs-blog-cat:hover,
.dark .fs-blog-cat.is-active { background: #fff; color: #000; }

/* featured post = home hero slide */
.fs-blog-featured {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
    padding: 14px 14px 14px 14px;
}
.fs-blog-featured-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 30px 46px 30px 0;
    order: -1;
}
.fs-blog-featured-title {
    font-size: clamp(22px, 2.6vw, 34px);
    line-height: 1.45;
    font-weight: 800;
    color: #000;
}
.dark .fs-blog-featured-title { color: #fff; }
.fs-blog-featured-title a:hover { text-decoration: underline; text-decoration-color: #E1FF00; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.fs-blog-featured-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-top: 26px;
    flex-wrap: wrap;
}
.fs-blog-featured-img {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.fs-blog-featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.fs-blog-featured-img:hover img { transform: scale(1.03); }

/* post grid */
.fs-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px 32px;
    margin-top: 56px;
    padding-bottom: 46px;
}

/* post card */
.fs-post-card { display: flex; flex-direction: column; min-width: 0; }
.fs-post-thumb {
    position: relative;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #F4F4F4;
}
.dark .fs-post-thumb { background: #121212; }
.fs-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.fs-post-card:hover .fs-post-thumb img { transform: scale(1.04); }
.fs-post-cat {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #E1FF00;
    color: #000;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}
.fs-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
}
.dark .fs-post-meta { color: #FFFFFF80; }
.fs-post-meta i { width: 1px; height: 12px; background: #D8D8D8; }
.fs-post-title {
    margin-top: 8px;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 800;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(18px * 1.6 * 2);
}
.dark .fs-post-title { color: #fff; }
.fs-post-excerpt {
    margin: 8px 0 18px;
    font-size: 13px;
    line-height: 1.9;
    font-weight: 400;
    color: #000;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(13px * 1.9 * 2);
}
.dark .fs-post-excerpt { color: #fff; }
.fs-post-foot {
    margin-top: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #EBEBEB;
}
.dark .fs-post-foot { border-top-color: #2A2A2A; }
.fs-post-author { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #000; }
.dark .fs-post-author { color: #fff; }
.fs-post-author img { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; }
.fs-post-go {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #000;
    display: grid;
    place-items: center;
    box-shadow: 6px 7px 14px 0 rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}
.dark .fs-post-go { background: #191919; box-shadow: none; }

/* ---------- single post ---------- */
.fs-blog-h1 { line-height: 1.5; }
.fs-blog-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fs-blog-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}
.fs-blog-main { flex: 1; min-width: 0; }
.fs-blog-side {
    width: 27%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 110px;
}
.fs-blog-cover { width: 100%; height: auto; border-radius: 30px; display: block; }
.fs-blog-box {
    border: 1px solid #EBEBEB99;
    border-radius: 20px;
    padding: 22px;
}
.dark .fs-blog-box { border-color: transparent; background: #191919; }
.fs-blog-box-product > .flex { gap: 20px !important; }

.fs-blog-toc { list-style: none; padding: 0; margin: 0; counter-reset: toc; display: flex; flex-direction: column; gap: 12px; }
.fs-blog-toc li { counter-increment: toc; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: #000; }
.dark .fs-blog-toc li { color: #fff; }
.fs-blog-toc li::before {
    content: counter(toc);
    width: 26px;
    height: 28px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.dark .fs-blog-toc li::before { background: #E1FF00; color: #000; }
.fs-blog-toc a:hover { text-decoration: underline; text-underline-offset: 4px; }

.fs-blog-copy {
    height: 3rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 0.75rem;
    border: 1px solid #000;
    box-shadow: 0 2px 0 0 #000;
    color: #000;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}
.dark .fs-blog-copy { border-color: #fff; box-shadow: 0 2px 0 0 #fff; color: #fff; }

.fs-blog-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.fs-blog-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.fs-blog-prevnext > a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-blog-grid-3 { margin-top: 0; }

/* article body — same rules as page-content.php (.product-description-content) */
.fs-post-content { padding: 40px 0 10px; color: #000; }
.dark .fs-post-content { color: #fff; }
.fs-post-content p { text-align: justify; font-size: 16px; font-weight: 600; line-height: 31px; margin-bottom: 40px; }
.fs-post-content strong { font-weight: 700; }
.fs-post-content h2 { font-size: 25px; font-weight: 800; line-height: 31px; margin-bottom: 30px; scroll-margin-top: 110px; }
.fs-post-content h3 { font-size: 21px; font-weight: 800; line-height: 31px; margin-bottom: 30px; }
.fs-post-content ul { display: flex; flex-direction: column; gap: 20px; font-size: 14px; font-weight: 600; margin-bottom: 40px; list-style: none; padding: 0; }
.fs-post-content ul li { display: flex; align-items: center; gap: 8px; }
.fs-post-content ul li::before { content: "✓"; font-weight: 700; }
.fs-post-content ol { position: relative; margin-bottom: 40px; counter-reset: item; list-style: none; padding: 0; }
.fs-post-content ol li { position: relative; margin-bottom: 16px; margin-right: 64px; font-size: 14px; font-weight: 600; line-height: 36px; counter-increment: item; }
.fs-post-content ol li::before { content: counter(item); position: absolute; right: -64px; width: 32px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; background: #000; border-radius: 9px; }
.dark .fs-post-content ol li::before { color: #000; background: #E1FF00; }
.fs-post-content img { width: 100%; height: auto; object-fit: cover; border-radius: 30px; margin-top: 0; margin-bottom: 40px; }
.fs-post-content blockquote { position: relative; padding: 0 60px; font-size: 14px; font-weight: 600; line-height: 31px; text-align: justify; margin-bottom: 50px; }
.fs-post-content blockquote::before { content: ""; position: absolute; right: 30px; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: #E1FF00; }

/* product mention inside the article */
.fs-post-product {
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #EBEBEB99;
    border-radius: 20px;
    padding: 14px 14px 14px 20px;
    margin-bottom: 40px;
}
.dark .fs-post-product { border-color: transparent; background: #191919; }
.fs-post-content .fs-post-product img { width: 64px; height: 90px; border-radius: 12px; margin: 0; flex-shrink: 0; }
.fs-post-product-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* WordPress editor output inside the article */
.fs-post-content h4 { font-size: 18px; font-weight: 800; line-height: 31px; margin-bottom: 24px; }
.fs-post-content :is(p, li, blockquote, td) a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.fs-post-content :is(p, li, blockquote, td) a:hover { text-decoration-color: #E1FF00; text-decoration-thickness: 3px; }
.fs-post-content figure { margin: 0 0 40px; }
.fs-post-content figure img { margin-bottom: 0; }
.fs-post-content figcaption { margin-top: 12px; font-size: 12px; font-weight: 600; text-align: center; opacity: .7; }
.fs-post-content .wp-block-embed iframe,
.fs-post-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 30px; margin-bottom: 40px; }
.fs-post-content table { width: 100%; border-collapse: collapse; margin-bottom: 40px; font-size: 14px; font-weight: 600; }
.fs-post-content th,
.fs-post-content td { border: 1px solid #EBEBEB; padding: 10px 14px; text-align: right; }
.fs-post-content th { font-weight: 800; background: #F4F4F4; }
.dark .fs-post-content th,
.dark .fs-post-content td { border-color: #2A2A2A; }
.dark .fs-post-content th { background: #121212; }
.fs-post-content ul ul,
.fs-post-content ol ol { margin: 16px 0 0; }
.fs-post-content > *:last-child { margin-bottom: 0; }
.fs-blog-prevnext > span:empty { display: none; }
.fs-blog-prevnext > a:only-child { grid-column: 1 / -1; }
.fs-blog-empty { margin-top: 56px; }

/* review-thread mobile fixes (same as the product page) */
#comments .fs-comment > .flex-1 { min-width: 0; }
#comments .fs-cmt-body { overflow-wrap: anywhere; }
@media (max-width: 767px) {
    #comments .fs-comment { gap: 0.75rem; }
    #comments .fs-comment .fs-comment { padding-right: 0.75rem; }
    #comments .fs-comment .fs-cmt-avatar { width: 2.25rem; height: 2.25rem; border-radius: 0.875rem; }
    #comments .fs-cmt-head { flex-wrap: wrap; row-gap: 0.25rem; }
    #comments .fs-cmt-head .fs-cmt-name { font-size: 16px; }
    #comments .fs-cmt-body { text-align: right; }
    #comments .fs-cmt-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
    #comments .fs-cmt-actions > button { padding-top: 0.375rem; padding-bottom: 0.375rem; }
    #comments .comment-line::before { display: none; }
}

/* ---------- header mini menu: latest posts ---------- */
.fs-menu-blog {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #D1D5DB;
    text-align: right;
}
.dark .fs-menu-blog { border-bottom-color: #374151; }
.fs-menu-blog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.fs-menu-blog-head span { font-size: 15px; font-weight: 700; color: #000; }
.fs-menu-blog-head a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    color: #fff;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}
.dark .fs-menu-blog-head span { color: #fff; }
.dark .fs-menu-blog-head a { background: #232323; }
.fs-menu-blog-head a svg { width: 5px; height: auto; }
.fs-menu-blog-item { display: flex; align-items: center; gap: 12px; }
.fs-menu-blog-thumb {
    width: 64px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #F4F4F4;
}
.dark .fs-menu-blog-thumb { background: #1A1A1A; }
.fs-menu-blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.fs-menu-blog-item:hover .fs-menu-blog-thumb img { transform: scale(1.06); }
.fs-menu-blog-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fs-menu-blog-text strong {
    font-size: 13px;
    line-height: 1.6;
    font-weight: 700;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fs-menu-blog-text small { font-size: 11px; font-weight: 600; color: #000; opacity: .6; }
.dark .fs-menu-blog-text strong,
.dark .fs-menu-blog-text small { color: #fff; }
.fs-menu-blog-item:hover strong { text-decoration: underline; text-decoration-color: #E1FF00; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
    .fs-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
    .fs-blog-featured { grid-template-columns: 1fr; gap: 0; }
    .fs-blog-featured-body { order: 0; padding: 24px 12px 12px; }
    .fs-blog-layout { flex-direction: column; }
    .fs-blog-side { width: 100%; position: static; }
}
@media (max-width: 767px) {
    .fs-blog-grid { grid-template-columns: 1fr; }
    .fs-post-title, .fs-post-excerpt { min-height: 0; }
    .fs-blog-search { width: 100%; }
    .fs-blog-featured { border-radius: 30px; }
    .fs-blog-featured-img { border-radius: 22px; }
    .fs-blog-featured-foot > .flex:last-child { width: 100%; justify-content: space-between; }
    .fs-blog-prevnext { grid-template-columns: 1fr; }
    .fs-post-content p { font-size: 15px; line-height: 29px; margin-bottom: 28px; }
    .fs-post-content h2 { font-size: 21px; margin-bottom: 20px; }
    .fs-post-content blockquote { padding: 0 24px; }
    .fs-post-content blockquote::before { right: 6px; }
    .fs-post-content img, .fs-blog-cover { border-radius: 22px; }
    .fs-post-product { flex-wrap: wrap; }
    .fs-post-product > a { width: 100%; justify-content: space-between; }
}
