/* فونت ایران‌سنس (Vazirmatn) - نسخه آپلود شده */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* اعمال فونت به کل سایت */
:root {
    --font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    font-family: var(--font-family);
}

/* برای اطمینان بیشتر */
body, input, textarea, select, button, h1, h2, h3, h4, h5, h6, p, span, div, a, li, td, th {
    font-family: var(--font-family);
}

/* تنظیم وزن فونت برای عناوین */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* تنظیم وزن فونت برای دکمه‌ها */
.btn {
    font-weight: 500;
}

/* تنظیم وزن فونت برای لینک‌های ناوبری */
.nav-link {
    font-weight: 500;
}

/* تنظیم وزن فونت برای متن معمولی */
body {
    font-weight: 400;
    line-height: 1.8;
}



/* ----- General Styles & Theme ----- */
:root {
    --primary-color: rgb(255 255 255);
    --secondary-color: rgb(121 121 121);
    --background-color: #2d2d2d;
    --text-color: rgb(255, 255, 255);
    --light-gray: #ffffff33;
    --border-color: #ffffff;
    --input-bg: #d6d6d6;
    --button-hover-bg: #4c4c4c;
}

body {
    font-family: 'Vazir', Tahoma, sans-serif; /* فونت وزیر برای فارسی */
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    direction: rtl; /* راست به چپ برای فارسی */
    overflow-x: hidden; /* جلوگیری از اسکرول افقی */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--button-hover-bg);
}

/* ----- Article Styles (Optional - if you want to style the article itself) ----- */
.article-content {
    background-color: var(--light-gray);
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.article-content p {
    margin-bottom: 1.2em;
}

/* ----- Comments Section ----- */
#comments-section {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#comments-section h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* ----- Comment Form ----- */
#comment-form {
    background-color: var(--background-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: inset 0 0 20px 1px rgb(255 255 255);
    margin-bottom: 40px;
}

#comment-form div {
    margin-bottom: 20px;
    position: relative; /* برای قرار دادن آیکون یا پیام خطا */
}

#comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

#comment-form input[type="text"],
#comment-form input[type="tel"],
#comment-form textarea {
    width: calc(100% - 24px); /* تنظیم عرض با احتساب padding */
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: black;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#comment-form input:focus,
#comment-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 8px rgba(106, 13, 173, 0.6);
}

#comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

#comment-form button {
    background-color: black;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgb(255 255 255);
}

#comment-form button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px); /* کمی برجسته شدن */
}

#form-message {
    margin-top: 15px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}
.message-success {
    background-color: #28a745; /* سبز */
    color: white;
}
.message-error {
    background-color: #dc3545; /* قرمز */
    color: white;
}

/* ----- Comments List ----- */
#comments-list {
    margin-top: 30px;
}

.comment {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

.comment-meta {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.comment-meta .commenter-name {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1em;
}

.comment-meta .commenter-phone {
    font-style: italic;
    color: #ccc;
    margin-left: 10px; /* فاصله از نام */
}

.comment-meta .comment-time {
    float: left; /* قرار دادن زمان در سمت چپ */
    font-size: 0.85em;
}

.comment-content {
    font-size: 1em;
    color: var(--text-color);
    word-wrap: break-word; /* شکستن کلمات طولانی */
    white-space: pre-wrap; /* حفظ فاصله‌ها و خطوط جدید */
}

/* ----- Footer ----- */
.site-footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    font-size: 0.9em;
    color: #888;
    border-top: 1px solid var(--border-color);
}

/* ----- Responsive Design ----- */
@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.7em; }
    h3 { font-size: 1.3em; }

    .container {
        padding: 15px;
    }

    #comment-form, #comments-section, .article-content {
        padding: 20px;
    }

    .comment-meta .comment-time {
        float: none; /* حذف شناور سازی در موبایل */
        display: block;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8em; }

    #comment-form input,
    #comment-form textarea {
        width: 100%;
    }

    #comment-form button {
        width: 100%;
        padding: 15px;
    }
}
