@font-face {
    font-family: 'B-Yekan';
    src: url('Yekan.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
a{
    text-decoration: none;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, sans-serif;
}

body {
    background-image: url('Back2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'B-Yekan';
}

header {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.388);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

h1 {
    font-size: 2.5em;
    color: #ffffff;
    font-family: 'B-Yekan';
}

.container {
    text-align: center;
    max-width: 900px;
    margin-top: 150px;
    margin-bottom: 50px;
    width: 100%;
}

.gallery {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    width: 100%;
}

.gallery-item {
    flex: 1;
    margin: 0 10px;
    text-align: center;
}

.gallery-item img {
    width: 300px;
    /* عرض 200 پیکسل */
    height: 150px;
    /* ارتفاع 200 پیکسل */
    object-fit: cover;
    /* تناسب تصویر حفظ می‌شود */
    border-radius: 10px;
}

.gallery-item h3 {
    margin-top: 10px;
    font-size: 1.5em;
    color: #ffffff;
    font-family: 'B-Yekan';
}

.gallery-item p {
    margin-top: 5px;
    font-size: 1em;
    color: #ffffff;
    font-family: 'B-Yekan';
}

/* Media Query برای صفحه‌های کوچک (مانند گوشی‌های موبایل) */
@media (max-width: 768px) {
    .container {
        margin-top: 100px;
        margin-bottom: 100px;
    }

    .h1 {
        font-size: 2em;
    }

    .gallery {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item {
        margin-bottom: 20px;
        width: auto;
    }
    .gallery-item:nth-child(1) {
        order: 3; /* عکس 1 آخر باشد */
    }

    .gallery-item:nth-child(2) {
        order: 2; /* عکس 2 وسط باشد */
    }

    .gallery-item:nth-child(3) {
        order: 1; /* عکس 3 اول باشد */
    }
    .main-image img,
    .gallery-item img {
        width: 300px;
        /* عرض ثابت در موبایل */
        height: 150px;
        /* ارتفاع ثابت در موبایل */
    }

    header {
        display: block;
        padding: 15px 0;
    }
}

/* سایر کدهای CSS شما */

footer {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.567);
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* بخش متحرک فارسی */
.footer-text {
    font-family: 'B-Yekan';
    white-space: nowrap;
    font-size: 1.2em;
    animation: moveTextFa 60s linear infinite;
    padding-bottom: 10px; /* فاصله از متن پایین */
    will-change: transform;
}

/* بخش ثابت مربوط به شرکت */
.footer-company-info {
    font-family: 'B-Yekan';
    font-size: 1em;
    color: #ccc;
    white-space: normal;
    padding: 0 20px;
}

/* رنگ قرمز برای متن مهم */
.important-text {
    color: red;
    font-family: 'B-Yekan';
}
.important-text2 {
    color: rgb(67, 158, 255);
    font-family: 'B-Yekan';
}

/* انیمیشن برای حرکت متن فارسی */
@keyframes moveTextFa {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* تنظیمات ریسپانسیو */
@media (max-width: 768px) {
    .footer-text {
        font-size: 1em; /* کوچکتر کردن متن فارسی در صفحه‌های کوچک */
        animation: moveTextFa 20s linear infinite;
    }

    .footer-company-info {
        font-size: 0.9em; /* کوچکتر کردن متن شرکت در صفحه‌های کوچک */
        padding: 0 15px;
    }
}

.caption {
    font-weight: bold;
    margin-top: 5px;
    font-family: 'B-Yekan';
}

.modal {
    display: none; /* پنهان به طور پیش‌فرض */
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* پس‌زمینه نیمه‌شفاف */
    overflow: auto; /* برای نمایش اسکرول در صورت نیاز */
    z-index: 1000; /* برای قرارگیری در بالای سایر محتواها */
    align-items: center; /* برای عمودی مرکز کردن محتوا */
    justify-content: center; /* برای افقی مرکز کردن محتوا */
}

.modal-content {
    direction: rtl;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto; /* اسکرول عمودی برای محتوا در صورت نیاز */
    position: relative;
    text-align: right; /* راست‌چین کردن محتوا درون پاپ‌آپ */
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-family: 'B-Yekan';
}

.modal-body p {
    font-size: 16px;
    line-height: 1.5;
    font-family: 'B-Yekan';
    text-align: justify;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
} 
