@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: normal;
    src: url("Vazir-FD.woff");
}

@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: 300;
    src: url("Vazir-Light-FD.woff");
}

@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: bold;
    src: url("Vazir-Bold-FD.woff");
}

@font-face {
    font-family: "RTNassim";
    src: url("rosettatype-nassim-bold.woff") format("woff");
    font-weight: normal;
    font-style: normal
}

@font-face {
    font-family: IRANBlack;
    font-weight: 900;
    src: url(IRANBlack.eot);
    src: url(IRANBlack.eot?#iefix) format("embedded-opentype"), url(IRANBlack.woff2) format("woff2"), url(IRANBlack.woff) format("woff"), url(IRANBlack.ttf) format("truetype")
}

html,
body,
div,
header,
Buttons,
footer,
h1,
h1 a,
h2,
h2 a,
h3,
h3 a,
h4,
h4 a,
h5,
h5 a,
h6,
h6 a,
p submit {
    font-family: "Vazir" !important;
}

h1,
h1 a,
h2,
h2 a,
h3,
h3 a,
h4,
h4 a,
h5,
h5 a,
h6,
h6 a entry-sub-title {
    font-family: IRANBlack !important;
}

a {
    font-family: Vazir !important;
}

p {
    font-family: Vazir !important;
}

blockquote {
    font-family: Vazir !important;
}

code {
    font-family: Vazir !important;
}


body {
    font-family: 'Arial, sans-serif';
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #f0f0f0;
	direction: rtl;
}

header {
    background-color: #1f1f1f;
    color: #fff;
    padding: 20px;
    text-align: center;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#projects {
    width: 90%; /* تنظیم عرض div#projects به 90% از عرض صفحه */
    max-width: 1200px; /* حداکثر عرض برای div#projects */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ۳ ستون در هر ردیف */
    gap: 20px; /* فاصله بین کارت‌ها */
    justify-items: center; /* مرکز چینش باکس‌ها در هر ستون */
}

.project {
    background-color: #1f1f1f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    width: 100%;
    max-width: 300px; /* حداکثر عرض برای باکس پروژه */
    position: relative; /* برای دکمه مشاهده پروژه */
}

.project:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.project img.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.project p.description {
    font-size: 0.75em;
    margin-bottom: 20px;
    height: 60px; /* تنظیم ارتفاع ثابت برای نمایش متن توضیحات */
    overflow: hidden; /* پنهان کردن متن اضافی */
}

.btn {
    background-color: #303f9f;
    color: #fff;
    padding: 5px 12px;
    font-size: 0.8em;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: absolute;
    bottom: 10px; /* موقعیت ثابت در پایین باکس */
    left: 50%;
    transform: translateX(-50%); /* مرکز چینش دکمه */
}

.btn:hover {
    background-color: #1e2a8f;
    color: #d1d1d1;
}

footer {
    background-color: #1f1f1f;
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.social-media {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-media .social-icon {
    color: #fff;
    font-size: 2em;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.social-media .social-icon:hover {
    color: #8b8b8b;
}

@media (max-width: 1024px) {
    #projects {
        grid-template-columns: repeat(2, 1fr); /* ۲ ستون با عرض مساوی در صفحه‌های کوچکتر */
    }
}

@media (max-width: 768px) {
    #projects {
        grid-template-columns: 1fr; /* ۱ ستون در هر ردیف */
    }
}

@media (max-width: 480px) {
    #projects {
        grid-template-columns: 1fr; /* ۱ ستون در هر ردیف */
    }
}
