/* General Styles */
body {
    font-family: 'Tahoma', sans-serif; /* فونت فارسی مناسب */
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    direction: rtl; /* مهم برای راست به چپ بودن */
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Header */
header {
    background: #333;
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #0779e4 3px solid;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden; /* برای نگه داشتن آیتم ها در کنار هم */
}

header li {
    float: right; /* چیدمان افقی از راست */
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: right; /* نام برند در سمت راست */
}

header #branding h1 {
    margin: 0;
}

header nav {
    float: right; /* ناوبری در سمت راست */
    margin-top: 10px;
}

header .highlight, header .current a {
    color: #0779e4;
    font-weight: bold;
}

header a:hover {
    color: #ccc;
    font-weight: bold;
}

/* Hero Section */
#hero {
    min-height: 400px;
    background: url('../images/hero.jpg') no-repeat center center/cover; /* مسیر تصویر هیرو */
    text-align: center;
    color: #fff;
    display: flex; /* استفاده از flexbox برای تراز عمودی */
    justify-content: center;
    align-items: center;
    flex-direction: column; /* قرار دادن متن ها ستونی */
}

#hero h1 {
    margin-top: 0;
    font-size: 55px;
    margin-bottom: 20px;
}

#hero p {
    font-size: 20px;
}

/* Main Content Sections */
section {
    padding: 40px 0;
    text-align: center;
}

section h2 {
    margin-bottom: 30px;
    font-size: 32px;
    color: #333;
    border-bottom: 2px solid #0779e4;
    display: inline-block; /* برای اینکه خط زیر فقط به اندازه عنوان باشد */
    padding-bottom: 5px;
}

section p {
    text-align: justify; /* تراز کردن متن پاراگراف */
    margin-bottom: 20px;
}

section ul {
    list-style: none;
    padding: 0;
    text-align: right; /* آیتم های لیست به سمت راست */
}

section li {
    margin-bottom: 10px;
    position: relative;
    padding-right: 20px; /* فاصله برای آیکون */
}

section li:before {
    content: '\2022'; /* نقطه چین */
    color: #0779e4;
    font-weight: bold;
    display: inline-block;
    position: absolute;
    right: 0; /* قرار دادن نقطه در سمت راست */
    top: -4px; /* تنظیم موقعیت عمودی */
    font-size: 24px;
    padding-left: 8px; /* فاصله بین نقطه و متن */
}

/* Quote Styling */
blockquote {
    margin: 30px 0;
    padding: 15px 20px;
    background: #e8e8e8;
    border-left: 5px solid #0779e4; /* مرز سمت راست برای RTL */
    text-align: justify; /* تراز کردن متن نقل قول */
    font-style: italic;
    color: #555;
}

blockquote p {
    margin-bottom: 5px;
}

blockquote cite {
    font-weight: bold;
    color: #333;
}

/* Contact Form */
#contact form {
    width: 60%;
    margin: 20px auto;
    text-align: right; /* فرم به سمت راست */
}

#contact label {
    display: block; /* هر لیبل در یک خط */
    margin-bottom: 5px;
    font-weight: bold;
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* برای اینکه padding و border عرض را زیاد نکنند */
    direction: rtl; /* اطمینان از راست به چپ بودن ورودی ها */
}

#contact textarea {
    height: 150px;
}

#contact input[type="submit"] {
    display: block;
    width: 150px;
    padding: 12px 20px;
    background-color: #0779e4;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin: 10px auto; /* وسط چین کردن دکمه */
    direction: ltr; /* دکمه ارسال را راست به چپ نگه داریم */
}

#contact input[type="submit"]:hover {
    background-color: #333;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

/* Responsive Design */
@media(max-width: 768px) {
    header #branding,
    header nav {
        float: none;
        text-align: center;
        width: 100%;
    }

    header nav ul li {
        display: block;
        padding: 10px 0;
    }

    #hero h1 {
        font-size: 40px;
    }

    #contact form {
        width: 90%;
    }
}

/* Additional Styles for Navigation & Layout */
nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex; /* استفاده از flexbox برای ناوبری */
    justify-content: center; /* وسط چین کردن آیتم های ناوبری */
    flex-direction: row; /* چیدمان افقی */
}

nav li {
    margin: 0 15px; /* فاصله بین آیتم های ناوبری */
}

nav a {
    text-decoration: none;
    color: #fff;
    padding: 8px 15px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #0779e4;
    border-radius: 5px;
}

/* Style for the #services section list items */
#services ul {
    list-style: none;
    padding: 0;
    display: inline-block; /* برای اینکه آیتم ها در کنار هم قرار بگیرند */
    text-align: right; /* محتوا به سمت راست */
}

#services li {
    display: inline-block; /* هر آیتم در یک خط */
    margin: 0 15px; /* فاصله بین آیتم ها */
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#services li:hover {
    transform: translateY(-5px); /* افکت شناور شدن */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* سایه */
}

/* Style for the #portfolio section */
#portfolio ul {
    list-style: none;
    padding: 0;
    display: grid; /* استفاده از grid برای چیدمان نمونه کارها */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* ستون های خودکار */
    gap: 20px; /* فاصله بین آیتم ها */
}

#portfolio li {
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

#portfolio img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Style for the #education section */
#education ul {
    list-style: none;
    padding: 0;
}

#education li {
    background-color: #fff;
    margin-bottom: 15px;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: right; /* متن به سمت راست */
}

#education a {
    color: #0779e4;
    text-decoration: none;
    font-weight: bold;
}

#education a:hover {
    text-decoration: underline;
}

/* Style for the quote in the main content */
section blockquote {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-right: 4px solid #0779e4; /* مرز سمت راست */
    border-left: none; /* حذف مرز سمت چپ */
    text-align: justify;
    font-style: italic;
    color: #555;
}

/* Specific styles for quotes from Imam Ali (a.s.) */
section blockquote cite {
    display: block; /* نام امام در خط جدید */
    text-align: left; /* نام امام به سمت چپ */
    margin-top: 10px;
    font-weight: bold;
    color: #333;
}

/* Final cleanup for RTL */
.contact-form-container {
    text-align: right; /* اطمینان از راست چین بودن فرم */
}

/* Add more specific styles as needed for better visual appeal and functionality */
/* Styles specific to services.html */
#services-detail h2 {
    margin-bottom: 40px;
    color: #0779e4;
}

.service-item {
    background-color: #fff;
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: right; /* محتوا به سمت راست */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.service-item h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.service-item ul {
    list-style: none;
    padding-right: 0;
    text-align: right;
}

.service-item li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 25px;
}

.service-item li:before {
    content: '\2713'; /* علامت تیک */
    color: #0779e4;
    font-weight: bold;
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 18px;
}

/* Adjusting the blockquote cite for better alignment in services */
#services-detail blockquote cite {
    text-align: left;
}

