/*
    Author: Rakibul Hassan Rifat
    Modified for RTL and New Identity
    Refactored by: Professional Assistant - Final Strict Version with UX Enhancements
*/

/*==========01) Import Section Start==========*/
/* 1. تعريف الخط العادي */
@font-face {
    font-family: 'XB Niloofar';
    src: url('../vendor/fonts/XB-Niloofar.ttf'); 
    font-weight: normal;
    font-style: normal;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* 2. تعريف الخط السميك */
@font-face {
    font-family: 'XB Niloofar'; 
    src: url('../vendor/fonts/XB-Niloofar-Bold.ttf'); 
    font-weight: bold;
    font-style: normal;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
/*==========01) Import Section End==========*/

/*==========02) Variable Section Start==========*/
:root {
    /*Theme Colors*/
    --text-gray: #3f4954;
    --text-light: #686666da;

    /* Dark Navy (Primary) */
    --bg-color: #091726;
    --mid-night: #091726;

    /* Gold/Light Brown (Secondary) */
    --accent-color: #917755;

    --white: #ffffff;

    /*Gradient Color*/
    --sky: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);

    --shadow-color: 0px 10px 30px rgba(9, 23, 38, 0.3);
    --box-shadow: 0px 10px 30px rgba(57, 56, 61, 0.205);

    /*=========Font Family==========*/
    --MainFont: 'XB Niloofar', 'Times New Roman', serif;
}
/*==========02) Variable Section End==========*/


/*==========03) Global CSS Section Start=========*/
html,
body {
    direction: rtl;
    text-align: right;
    font-family: var(--MainFont);
}

section {
    padding: 80px 0;
}

.img-center {
    display: block;
    margin: 0 auto;
}

.no-padding {
    padding: 0;
}

/* Force Font Family on all elements */
h1, h2, h3, h4, h5, h6, p, label, a, span, div {
    font-family: var(--MainFont) !important;
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
}

h2 {
    font-size: 2rem;
    font-weight: bold;
}

h3 {
    font-size: 1.5rem;
    font-weight: bold;
}

p {
    font-size: 16px;
    line-height: 1.8;
    font-weight: bold;
    color: #091726;
}

h5 {
    font-size: 22px;
    font-weight: bold;
}

h6 {
    font-size: 20px;
    font-weight: bold;
}

label {
    font-family: var(--MainFont);
}

.btn-custom {
    display: block;
    margin: 0 auto;
    padding: 6px 20px;
    background-color: var(--accent-color);
    border: none;
    color: #fff;
    text-decoration: none !important;
    font-weight: bold;
}

.btn-custom:hover {
    background-color: var(--mid-night);
    color: var(--accent-color);
}

.btn:active,
.btn:focus {
    outline: none !important;
    box-shadow: none;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: none !important
}

.navbar_fixed {
    position: fixed;
    width: 100%;
    top: -1px;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: var(--box-shadow);
    z-index: 999;
    transition: all 1s ease;
    padding: 0.5rem 1rem;
}

/*==========03) Global CSS Section End=========*/
/* تنسيق الشعار الحر - النسخة الأصلية */

/* =========================================
   New Custom Preloader Styles
   ========================================= */
#custom-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #091726; 
    z-index: 99999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* حاوية الشعار */
.loader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

/* تنسيق الشعار */
.pulsing-logo {
    width: 400px;
    max-width: 90%;
    height: auto;
    animation: goldPulse 2s infinite ease-in-out;
}

/* تعريف حركة النبض والوهج */
@keyframes goldPulse {
    0% {
        transform: scale(1);
        filter: contrast(1.5) drop-shadow(0 0 0 rgba(145, 119, 85, 0)); 
    }
    50% {
        transform: scale(1.05);
        filter: contrast(1.5) drop-shadow(0 0 30px rgba(145, 119, 85, 0.9)); 
    }
    100% {
        transform: scale(1);
        filter: contrast(1.5) drop-shadow(0 0 0 rgba(145, 119, 85, 0));
    }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

/*==========04) Header Section Start==========*/
header .navbar-brand {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 15px;
    margin: 0 !important;
    white-space: nowrap;
}

header .navbar-brand img {
    height: 85px !important; 
    width: auto !important; 
    max-width: 100%; 
}

header .navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    direction: rtl;
}

header .navbar-brand .brand-text div,
header .navbar-brand .brand-text span {
    text-align: right;
    direction: rtl;
}

/* New Branding Classes */
.brand-title {
    color: #000;
    font-size: 16px; 
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 2px;
}

.brand-subtitle {
    color: #000;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}

.brand-separator {
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    margin: 5px 0;
}

.english-wrapper {
    display: flex;
    flex-direction: column;
    width: fit-content; 
    margin: 0 auto;     
}

.brand-english {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.2;
    font-family: 'Times New Roman', serif !important;
    text-align: center !important;
}

.brand-footer {
    width: 100%;
    color: var(--accent-color);
    margin-top: 2px;
}

.brand-footer .line {
    flex: 1;
    height: 1px;
    background-color: var(--accent-color);
    opacity: 0.7;
}

.law-firm-text {
    font-size: 12px;
    font-weight: 500;
    margin: 0 8px;
    letter-spacing: 2px;
    font-family: 'Times New Roman', serif !important;
}

header ul li a {
    padding: 10px;
    color: var(--mid-night);
    text-transform: uppercase;
    font-weight: bold;
    font-size: 17px;
}

header ul li a:hover {
    border-bottom: 2px solid var(--accent-color);
    cursor: pointer;
}

header ul li a.active {
    color: var(--accent-color) !important;
    border-bottom: 2px solid var(--accent-color);
}

.navbar-nav {
    margin-right: auto !important;
    margin-left: 0 !important;
    padding-right: 0;
}

.ml-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/*==========04) Header Section End==========*/

/*==========05) Hero Section Start (Standard Dark Overlay) ==========*/
#hero {
    background-color: var(--bg-color);
    background-image: url(../img/hero.png);
    background-repeat: no-repeat;
    background-size: 95% auto;
    background-position: center center;
    width: 100%;
    position: relative;
    min-height: 600px;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(9, 23, 38, 0.7);
    z-index: 0;
}

#hero .hero-content {
    position: relative;
    z-index: 1;
    padding-top: 200px;
    padding-bottom: 150px;
    text-align: right;
}

#hero .hero-heading,
.about-heading,
.clients-heading,
.practice-heading,
.publication-heading,
.faq-heading,
.contact-heading {
    padding: 0 15px;
    border-right: 4px solid var(--accent-color);
    border-left: none;
    line-height: 1.5;
}

#hero .hero-heading {
    color: #fff;
}

#hero .hero-heading h1 {
    letter-spacing: 0;
    font-weight: bold;
}

.main-hero-title {
    font-size: 42px;
}

#hero .btn {
    margin: 0;
    border-radius: 20px;
    padding: 10px 25px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
}

.whatsapp-hero-btn {
    text-decoration: none;
    font-weight: bold;
}

.hero-wa-icon {
    width: 22px;
    height: auto;
    margin-left: 10px;
}

/*==========05) Hero Section End==========*/

/*==========06) About Us Section Start==========*/
.about-heading,
.lawyers-heading,
.publication-heading {
    border-right: 4px solid var(--accent-color);
    border-left: none;
    padding: 0 20px;
}

.list-bullet {
    color: var(--accent-color);
    font-size: 10px;
    margin-left: 10px;
}

.list-square {
    color: var(--accent-color);
    font-size: 6px;
    margin-top: 10px;
    margin-left: 10px;
}

.goals-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/*==========06) About Us Section End==========*/

/*==========07) Practice Area & Contact Section Start==========*/
#practice-area,
#clients,
#contact {
    background-color: var(--bg-color);
}

#practice-area h4 {
    color: #ffffff;
    font-weight: bold;
}
/*==========07) Practice Area Section End==========*/

/*==========08) Lawyers Section Start==========*/
#lawyers .card {
    transition: all 0.7s ease;
    border: 1px solid #eee;
}

#lawyers .card:hover {
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transform: scale(1.05);
    border-color: var(--accent-color);
}

#lawyers .card-body {
    padding: 15px;
    text-align: center;
}

#lawyers .card-body p {
    margin-bottom: 5px;
    color: var(--accent-color);
    font-weight: bold;
}

#lawyers .card-body h5 {
    color: var(--mid-night);
    font-weight: bold;
}

/* Professional Info Section */
.no-padding-section {
    padding-top: 0 !important;
}

.career-wrapper {
    border-right: 4px solid var(--accent-color);
    padding-right: 30px;
    margin-bottom: 30px;
}

.career-title {
    font-weight: bold;
}

.career-item {
    border-right: 3px solid var(--accent-color);
    padding-right: 15px;
}

.career-heading {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--mid-night);
}

.career-desc {
    color: #555;
    line-height: 1.8;
}
/*==========08) Lawyers Section End==========*/

/*==========09) Clients Section Start==========*/
#clients .clients-img {
    box-shadow: -15px 15px 0px var(--accent-color);
    border: 5px solid #fff;
}

#clients .owl-theme .owl-dots .owl-dot.active span,
#clients .owl-theme .owl-dots .owl-dot:hover span {
    background: var(--accent-color) !important;
}
/*==========09) Clients Section End==========*/

/*==========12) Contact Section Start==========*/
#contact h1,
#contact p {
    color: #fff;
}

.form-control {
    border: none;
    border-bottom: 1px solid #ffffff;
    margin-bottom: 10px;
    padding: 15px 1px;
    outline: none;
    background: transparent;
    text-align: right;
    color: #fff;
    font-size: 18px;
}

.form-control::placeholder {
    color: #cccccc;
}

#message {
    padding: 50px 0;
}

.form .btn {
    display: block;
    margin: 0 auto;
    padding: 10px 30px;
    background-color: var(--accent-color);
    border: none;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
}

.form .btn:hover {
    background-color: #fff;
    color: var(--mid-night);
}

.map {
    box-shadow: 25px 25px 1px var(--accent-color);
}

.map-iframe {
    width: 350px;
    height: 300px;
    border: 0;
}
/*==========12) Contact Section End========*/

/*==========13) Footer Section Start==========*/
footer.bg-dark {
    background-color: var(--mid-night) !important;
}

.main-footer {
    padding-top: 60px;
    padding-bottom: 30px;
}

.footer-icon {
    color: var(--accent-color);
    font-size: 24px;
}

.footer-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

.footer-text {
    font-size: 14px;
}

.social-link {
    transition: transform 0.3s;
}

.social-img {
    width: 35px;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer-divider {
    border-color: var(--accent-color);
    opacity: 0.5;
    margin-bottom: 30px;
}

.copyright-text {
    font-size: 14px;
}
/*==========13) Footer Section End==========*/

/*=========Media Query Start (Improved UX) ========*/

/* تحسينات عامة لكل الشاشات الصغيرة والتابلت */
@media (max-width: 991px) {
    section {
        padding: 50px 0; /* تقليل المساحات الطولية */
    }
    
    #hero {
        min-height: 500px;
        background-size: cover;
        background-position: center top;
    }

    #hero .hero-content {
        padding-top: 150px;
        padding-bottom: 100px;
    }

    #hero .hero-content .offset-md-2 {
        margin: 0 auto;
    }
    
    .navbar-collapse {
        text-align: right;
    }
}

/* للجوال (الشاشات المتوسطة والصغيرة) */
@media (max-width: 767px) {
    section {
        padding: 40px 0; /* تقليل إضافي للمساحات */
    }

    #hero {
        min-height: 400px;
    }

    #hero .hero-content {
        padding-top: 120px;
        padding-bottom: 80px;
    }
    
    /* حل مشكلة أيقونات الخدمات - إجبار الحجم */
    #practice-area img {
        width: 60px !important;    /* حجم ثابت مناسب */
        height: auto !important;
        max-width: 100%;
        margin: 0 auto 15px auto;  /* توسيط الصورة ومسافة تحتها */
        display: block;
    }
    
    /* توسيط نصوص الخدمات */
    #practice-area .col-md-5, 
    #practice-area .col-lg-4, 
    #practice-area .col-md-6 {
        text-align: center;
        margin-bottom: 40px; /* مسافة بين الخدمة والأخرى */
    }
    
    #practice-area h4 {
        margin-top: 10px;
        font-size: 20px;
    }

    #hero .hero-heading {
        color: #fff !important;
    }

    #about-us .expertise {
        margin-top: 25px;
    }

    #lawyers .downteam {
        margin-top: 15px;
    }

    #clients .clients {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 30px;
        width: 100%;
        text-align: center;
    }

    #clients .clients-img {
        width: 80%;
        margin: 0 auto;
    }

    #contact .map-frame {
        margin: 20px auto 0;
        display: block;
        text-align: center;
    }
}

/* للجوال (الشاشات الصغيرة جداً) */
@media (max-width: 575px) {
    /* تعديل الهيدر */
    header .navbar-brand {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    header .navbar-brand .brand-text {
        text-align: center !important;
        align-items: center !important;
    }

    header .navbar-brand .brand-text div,
    header .navbar-brand .brand-text span {
        text-align: center !important;
    }
    
    header .navbar-toggler {
        margin: 10px auto 0 auto; 
    }

    #hero {
        min-height: 300px;
    }

    #hero .hero-content {
        padding-top: 80px;
        padding-bottom: 50px;
    }
    
    /* تصغير الخط الرئيسي للجوال */
    .main-hero-title {
        font-size: 28px !important;
    }

    #lawyers .card {
        margin: 10px auto;
        width: 90%;
    }

    #clients .clients {
        width: 100%;
        margin: 0 auto;
    }

    /* تعديل الخريطة */
    #contact iframe {
        display: block !important;
        width: 100% !important;
        height: 250px !important;
        margin-top: 30px;
        border-radius: 8px;
    }

    #contact .map-frame {
        margin: 0 auto;
        width: 100%;
    }

    #contact .map {
        margin-top: 20px;
        box-shadow: none;
    }
}

@media (max-width: 380px) {
    header .navbar-brand {
        text-align: center;
        margin-left: 0;
    }

    header .navbar-brand span.dot {
        display: none;
    }
}
/*==========Media Query End==========*/


/* ========== WhatsApp Floating Button Start ========== */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    background-color: #25d366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    background-color: #1ebc57;
}

.whatsapp-btn img {
    width: 35px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* ========== WhatsApp Floating Button End ========== */

/* Practice Area Icons Coloring */
#practice-area .wow.flipInX img {
    width: 58px !important;
    height: 38px !important;
    object-fit: contain;
    filter: invert(47%) sepia(35%) saturate(489%) hue-rotate(349deg) brightness(92%) contrast(88%);
    transition: all 0.3s ease;
}

#practice-area .col-md-5:hover .wow.flipInX img {
    transform: scale(1.1);
    filter: brightness(0) invert(1);
}