/* ================================================= */
/* * base.css
 * استایل‌های عمومی هدر، منو، فوتر و ساختار فرم (مشترک بین تمام صفحات)
 * ================================================= */

/* --- تنظیمات عمومی بدنه --- */
body {
    font-family: Tahoma, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    direction: rtl; /* جهت راست به چپ */
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

main {
    padding: 20px 0;
    min-height: 70vh;
}

/* --- هدر و ناوبری (Header & Nav) --- */
header {
    background-color: #001f3f; /* آبی تیره */
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    color: #fff;
    padding: 10px 0;
    position: relative;
}

nav a:hover {
    color: #ffd700; /* زرد طلایی هنگام هاور */
}

nav a.active::after,
.dropbtn.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #007bff;
    bottom: -5px;
    right: 0;
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: white;
    padding: 10px 0;
    font-size: 1em;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
    right: 0; /* نمایش از راست */
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    display: block;
    text-align: right;
}

.dropdown-content a:hover {
    background-color: #ddd;
    color: #007bff;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- استایل‌های اصلی فرم (Form Structure) --- */
.visa-form {
    max-width: 850px;
    margin: 30px auto;
}

.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.visa-form input:not([type="checkbox"], [type="radio"], [type="file"]),
.visa-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.visa-form input:focus,
.visa-form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    outline: none;
}

.divider {
    border: 0;
    height: 1px;
    background-color: #ccc;
    margin: 30px 0;
}

/* --- دکمه‌ها و فرم اکشن‌ها --- */
.form-actions {
    display: flex;
    justify-content: flex-start; /* شروع از راست (در جهت RTL) */
    gap: 15px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 700;
    transition: background-color 0.3s, opacity 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
}
.btn-primary:disabled {
    background-color: #a0c3e6;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* --- پیام‌های خطا و موفقیت --- */
.error-message, .success-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* --- فوتر --- */
footer {
    background-color: #343a40;
    color: #bbb;
    padding: 20px 30px;
    text-align: center;
    font-size: 0.9em;
}

.footer-links a {
    color: #adb5bd;
    margin: 0 10px;
}
.footer-links a:hover {
    color: #fff;
}
.footer-copy p {
    margin-top: 10px;
}

/* --- واکنش‌گرا (Responsive) --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    header h1 {
        margin-bottom: 10px;
    }
    nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    nav a, .dropdown {
        width: 100%;
        text-align: center;
    }
    .dropdown-content {
        position: static;
        width: 100%;
    }
    .card {
        padding: 20px 15px;
    }
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
}