.wrapper.wrapper-full-page {
    height: auto;
    min-height: 100vh;
}

.off-canvas-sidebar .wrapper-full-page .page-header {
    padding: 15vh 0 !important;
}

.page-header,
.page-header .page-header-image {
    height: 100%;
    background-position: 50%;
    background-size: cover;
}

.page-header {
    align-items: center;
}

.header-filter .container {
    z-index: 2;
    position: relative;
}

.login-page .card-login,
.register-page .card-signup {
    transform: translateZ(0);
}

.login-page .card-login .card-header,
.register-page .card-signup .card-header {
    margin-top: -40px !important;
    margin-bottom: 20px;
}

.login-page .card-login .card-title,
.register-page .card-signup .card-title {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-page .card-login .card-body,
.register-page .card-signup .card-body {
    padding: 0 30px 0 10px;
}

.login-page .card-login .card-body .input-group .input-group-text,
.register-page .card-signup .card-body .input-group .input-group-text {
    padding: 15px 15px 0;
}

.login-page .card-login .card-body .input-group .form-control,
.register-page .card-signup .card-body .input-group .form-control {
    padding-bottom: 10px;
    margin: 17px 0 0;
}

.header-filter {
    background-size: cover;
    background-position: top center;
    background-blend-mode: saturation;
}

.login-page {
    background-image: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url('/md/img/login.jpg');
}

.register-page {
    background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0)), url('/md/img/register.jpg');
}

.header-filter::before {
    background: rgba(0, 0, 0, .5);
}

.header-filter::after,
.header-filter::before {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    left: 0;
    top: 0;
    content: '';
}

.bmd-form-group .error {
    font-size: 0.8rem;
    color: #f44336;
    font-weight: 400;
}

.card-login .error,
.card-signup .error,
.card-login .form-check {
    margin-left: 56px;
}

.card-login .form-check {
    margin-top: 17px;
    padding-top: 3px;
}

.alert {
    font-weight: 400;
}

.register-page .card-signup {
    border-radius: 6px;
    box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
    margin-bottom: 100px;
    margin-top: 15vh;
}


/* تحسينات عامة للموبايل */


/* تحسين العرض العام للموقع على الموبايل */

@media screen and (max-width: 767px) {
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }
    /* تحسين حجم الخط */
    h1 {
        font-size: 1.75rem !important;
    }
    h2 {
        font-size: 1.5rem !important;
    }
    h3 {
        font-size: 1.25rem !important;
    }
    p {
        font-size: 0.95rem !important;
    }
    /* تحسين الأزرار */
    button,
    .button,
    a.button {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
    /* تحسين المسافات */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    /* تحسين النماذج */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* منع تكبير الصفحة عند التركيز في iOS */
    }
    /* تحسين الجداول */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    /* تحسينات للصور في الموبايل */
    img:not(.w-auto) {
        max-width: 100%;
        height: auto;
    }
    /* تحسين عرض الكروت */
    .lawyer-card-wrapper {
        width: 100% !important;
    }
    .lawyer-card {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    }
    /* تحسين عرض البحث */
    .search-section {
        border-radius: 0.75rem !important;
    }
    /* تحسين عرض الأيقونات */
    .fa,
    .fas,
    .far,
    .fab {
        font-size: 90%;
    }
    /* تحسين عرض النصوص الطويلة */
    .text-truncate {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    /* تحسين عرض الفورم */
    form {
        width: 100%;
    }
    /* تحسين عرض الزرار */
    button[type="submit"] {
        width: 100%;
        margin-top: 0.5rem;
    }
    /* تحسين عرض الهيدر */
    #main-header {
        padding: 0.5rem 0;
    }
    /* تحسين عرض الفوتر */
    .lg\:hidden.flex.py-3 {
        height: auto !important;
        min-height: 60px;
    }
    /* تحسينات خاصة لكروت المحامين */
    .lawyer-card-container {
        width: 100% !important;
        margin-bottom: 1.5rem !important;
    }
    .lawyer-card .profile-image {
        width: 140px !important;
        height: 140px !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    }
    .lawyer-card .mobile-card-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    .lawyer-card .lawyer-details {
        width: 100% !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
    }
    .lawyer-card .lawyer-name {
        font-size: 1.25rem !important;
        text-align: center !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    .lawyer-card .lawyer-badges {
        justify-content: center !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .lawyer-card .lawyer-location,
    .lawyer-card .lawyer-languages,
    .lawyer-card .lawyer-rating {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .lawyer-card .contact-icon {
        width: 36px !important;
        height: 36px !important;
    }
}


/* تحسينات للأجهزة اللوحية */

@media screen and (min-width: 768px) and (max-width: 1023px) {
    /* تحسين المسافات */
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    /* تحسين عرض الكروت */
    .lawyer-card {
        padding: 1rem !important;
    }
}


/* تحسينات لأجهزة الجوال الصغيرة */

@media screen and (max-width: 374px) {
    html {
        font-size: 14px;
    }
    /* تصغير العناصر للشاشات الصغيرة جدًا */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    /* تحسين عرض الكروت للشاشات الصغيرة */
    .lawyer-card {
        padding: 0.5rem !important;
    }
    .profile-image {
        width: 100px !important;
        height: 100px !important;
    }
    /* تصغير الأيقونات */
    .fa,
    .fas,
    .far,
    .fab {
        font-size: 80%;
    }
    /* تحسينات إضافية للشاشات الصغيرة */
    .lawyer-card .lawyer-name {
        font-size: 1.1rem !important;
    }
    .lawyer-card .lawyer-badges span {
        font-size: 0.65rem !important;
    }
    .lawyer-card .lawyer-location,
    .lawyer-card .lawyer-languages,
    .lawyer-card .lawyer-rating {
        font-size: 0.75rem !important;
    }
}