﻿/* --- login-style.css --- */

/* اضافه کردن فونت BYekan از CDN */
@import url('https://cdn.fontcdn.ir/Font/Persian/BYekan.css');

/* Reset و تنظیمات پایه */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
    font-family: 'BYekan', Tahoma, 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    direction: rtl; /* راست به چپ */
    background-color: #f8f9fa;
    line-height: 1.6;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* نگهدارنده اصلی صفحه */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* بخش تصویر (سمت چپ) */
.login-image-section {
    flex: 1 1 60%;
    background-image: url('../images/pic.jpg');
    background-size: cover;
    background-position: center center;
    position: relative;
    color: white;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.image-text-content {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

    .image-text-content h1 {
        font-size: 2.8rem;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .image-text-content h2 {
        font-size: 2rem;
        font-weight: normal;
    }

.image-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.image-footer-text {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

    .image-footer-text h3 {
        font-size: 1.6rem;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .image-footer-text h4 {
        font-size: 1.2rem;
        font-weight: normal;
        margin: 0;
    }

.image-nav-arrow {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    border: 2px solid white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

    .image-nav-arrow:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

/* بخش فرم (سمت راست) */
.login-form-section {
    flex: 1 1 40%;
    padding: 40px;
    background-image: url('../images/mamm.jpg');
    background-size: cover;
    background-position: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Wrapper داخلی فرم */
.form-wrapper {
    width: 100%;
    max-width: 400px;
    text-align: right;
}

/* هدر فرم */
.form-header {
    text-align: center;
    margin-bottom: 25px;
}

    .form-header .brand-logo {
        opacity: 0.8;
    }

    .form-header h2 {
        color: #4a4a4a;
        margin-top: 15px;
        font-size: 1.3rem;
        font-weight: bold;
    }

/* عنوان و توضیحات فرم */
.login-form-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.form-description {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.7;
}

/* استایل فرم اصلی */
.login-form .form-group {
    margin-bottom: 18px;
}

.login-form .form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    color: #495057;
}

.login-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .login-form .form-control:focus {
        border-color: #80bdff;
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    .login-form .form-control::placeholder {
        color: #adb5bd;
        font-size: 0.9em;
        font-style: italic;
    }

/* استایل پیام‌های خطا */
.login-form .text-danger {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* استایل خطای کلی بالای فرم */
.alert.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

/* استایل دکمه ها */
.login-form .button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.login-form .btn {
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.login-form .btn-login {
    background-color: darkblue;
    color: white;
    border: 1px solid darkblue;
}

    .login-form .btn-login:hover {
        background-color: blue;
        border-color: blue;
    }

.login-form .btn-password-login {
    background-color: white;
    color: #6c757d;
    border: 1px solid #ced4da;
}

    .login-form .btn-password-login:hover {
        background-color: #f8f9fa;
        border-color: #adb5bd;
        color: #495057;
    }

/* فوتر فرم */
.form-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.7;
}

    .form-footer a {
        color: #007bff;
        text-decoration: none;
        font-weight: bold;
    }

        .form-footer a:hover {
            text-decoration: underline;
            color: #0056b3;
        }

/* طراحی واکنشگرا (Responsive) */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
    }

    .login-image-section,
    .login-form-section {
        flex-basis: auto;
        width: 100%;
    }

    .login-image-section {
        min-height: 300px;
        order: 2;
        padding: 30px;
    }

    .login-form-section {
        min-height: calc(100vh - 300px);
        padding: 30px;
        order: 1;
        justify-content: center;
    }

    .form-wrapper {
        max-width: 400px;
    }

    .image-text-content h1 {
        font-size: 2rem;
    }

    .image-text-content h2 {
        font-size: 1.5rem;
    }

    .image-footer-text h3 {
        font-size: 1.3rem;
    }

    .image-footer-text h4 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-image-section {
        min-height: 200px;
        padding: 20px;
    }

    .login-form-section {
        padding: 20px;
        min-height: calc(100vh - 200px);
    }

    .form-wrapper {
        max-width: 100%;
    }

    .form-header .brand-logo {
        height: 20px;
        margin: 0 5px;
    }

    .login-form-section h3 {
        font-size: 1.3rem;
    }

    .form-description {
        font-size: 0.85rem;
    }

    .login-form .form-control {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    .login-form .btn {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .form-footer {
        font-size: 0.75rem;
    }
}

/* برچسب‌ها رنگ سفید */
label {
    color: white !important;
}
