:root {
    --mainColor : #147854;
    --lightMainColor : #93dbc1;
    --lightMainColor-30 : #93dbc130;
    --gray : #f1f1f1;
    --gray2 : #6b7074;
    --link: #2d9ff0;
}

@font-face{
    font-family: kalameh-regular;
    src: url(../../font/Kalameh-FaNo-Regular.ttf);
}

@font-face{
    font-family: kalameh-bold;
    src: url(../../font/Kalameh-FaNo-Bold.ttf);
}

* {
    font-family: kalameh-regular;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.mainDiv a {
    color: var(--link);
    text-decoration: none;
}

p, h1, h2, h3, h4, h5, h6, ul, li, a {
    margin: 0;
    padding: 0;
}

.rightDiv {
    position: relative;
}

@media (max-width: 1000px) {
    .rightDiv {
        display: none;
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 7%;
    right: 4.5%;
    width: 1.5%;
    background-color: var(--mainColor);
    border-radius: .5em;
    padding: 1em;
    height: auto;
    cursor: pointer;
    display: none;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover {
    transform: scale(1.1); /* بزرگ‌تر شدن هنگام هاور */
}

.mainDiv{
    text-align: justify;
    line-height: 1;
    display: grid;
    grid-template-columns: 9% 61% 26%;
    position: relative;
    column-gap: 2%;
    margin: 2em;
    margin-top: 17vh;
}

@media (max-width: 1000px) {
    
    
    
}

ul.dashList {
    list-style: none;
}

ul.dashList li::before {
    padding-right: 1em;
    content: "- ";
    color: #555;
}

ul.numberedDashList {
  counter-reset: li;
  list-style: none;
  padding: 0;
}

ul.numberedDashList li {
  counter-increment: li;
  margin: 5px 0;
}

ul.numberedDashList li::before {
  content: counter(li) " - ";
  font-weight: bold;
  color: #333;
}

ul.question > li {
    border: 1px solid var(--mainColor);
    border-radius: 10px;
    padding: 1em .5em;
    margin-bottom: 1em;
}

li > span {
    display: block;
    position: relative;
    padding-right: 1.2em;
}

li > span::before {
    content: "";
}

.mainDiv section {
    padding: 2em;
    box-sizing: border-box;
    width: 100%;
    /* margin: 20px auto; */
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.mainDiv h1 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 2.2;
    max-width: 70%;
    text-align: right;
}

@media (max-width: 1000px) {

    .mainDiv {
        grid-template-columns: 100%;
        margin: 0;
        line-height: 2.2;
        margin-top: 12vh;
    }
    .mainDiv section {
        padding: 5vw;
    }

    .mainDiv h1 {
        font-size: 4.5vw;
        max-width: unset;
        line-height: unset;
    }
}

.topic {
    display: grid;
    grid-template-columns: auto auto auto;
    width: 100%;
    align-content: center;
    align-items: center;
    justify-self: center;
    justify-content: space-between;
    justify-items: space-between;
}

.topic > div {
    display: flex;
    column-gap: 1em;
    align-items: center;
    align-content: center;
}

.topic > div > img {
    width: 3em;
    height: 3em;
    border-radius: 100em;
    object-fit: cover;
}

@media (max-width: 1000px) {
    .topic {
        grid-template-columns: auto auto;
        font-size: 3.5vw;
    }

    .topic > :first-child {
        justify-self: start;
    }

    .grid > :nth-child(2) {
    justify-self: end;   /* ستون دوم (در RTL یعنی چپ) */
    }

    /* آیتم سوم، ردیف بعد، در ستون اول می‌افته */
    .grid > :nth-child(3) {
    justify-self: start; /* چون ستون ۱ هست */
    }

    .topic > div > img {
        width: 8vw;
        height: auto;
    }
}

.image-container {
    text-align: center;
    margin: 20px 0;
}

.mainDiv img {
    border-radius: 3px;
    width: 100%;
    max-width: 800px;
    height: auto;
}

.content {
    margin-bottom: 2rem;
    font-size: 1.1em;
    line-height: 2em;
}

.content > h2 {
    margin-bottom: 1em;
}

.toc {
    box-sizing: inherit;
    line-height: 1;
    font-size: 1.1rem;
    margin-bottom: 32px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
    margin: 10px auto;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12);
}

@media (max-width: 1000px) {
    .toc {
        line-height: 2.2;
    }
}

.toc h2 {
    font-size: 1rem;
    color: var(--gray2);
}

ul {
    list-style-type: none;
    padding: 0;
}

.toc a {
    display: block;
    padding: 8px;
    text-decoration: none;
}

.toc a:hover {
    background-color: #ddd;
}

.leftDiv {
    position: absolute;
    /* padding: 2em; */
    box-sizing: border-box;
    height: 100vh;
    /* width: 100%; */
    /* position: fixed; */
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    left: 0;
    width: 26%;
    /* height: 100%; */
    overflow: hidden; /* مخفی کردن اسکرول اصلی */
    /* position: relative; */
    /* padding: 10px; */
}


.leftDiv > div {
    transition: all 0.3s ease;
    /* min-height: 100px; شروع ارتفاع */
    position: absolute;
    /* max-height: calc(100vh - 40px); */
    /* position: absolute; */
    top: 0;
    width: 100%;
    height: 100%; /* ارتفاع به اندازه‌ی سایدبار */
    overflow: auto; /* اسکرول برای محتوا داخل div */
    padding-right: 15px; /* برای ایجاد فضای اسکرول */
    box-sizing: border-box;
    padding: 2em;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE و Edge قدیمی */
}

.leftDiv > div::-webkit-scrollbar {
    display: none; /* Chrome، Safari، Edge جدید */
}

.leftDiv hr {
    background: var(--lightMainColor-30);
    border: none;
    height: 3px;
}

.otherBlogTitr {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
}

.otherBlogTitr > hr {
    background: var(--mainColor);
    border: none;
    width: 20%;
    height: 3px;
}

@media (max-width: 1000px) {
    .leftDiv {
        position: relative;
        width: 100%;
        border-top: 1px solid #e2e2e2;
    }
}

.otherBlogCard {
    border-radius: 10px;
    display: flex;
    align-items: center;
    text-decoration: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 5em;
    margin: 20px auto;
    text-decoration: none;
    text-align: justify;
    color: #000;
  }

  .otherBlogCard img {
    border-radius: 0;
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .otherBlogContent {
    padding: 10px 15px;
    row-gap: 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .otherBlogTitle {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* فقط 2 خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .8rem;
    line-height: 1.3;
  }

  .otherBlogDate {
    font-size: .6rem;
    color: var(--gray2);
    display: flex;
    align-items: center;
  }