/* ====================================================================
   [1] الإعدادات الأساسية والثوابت (Base Setup & Variables)
   ==================================================================== */
:root {
    --bg-black: #111;
    --bg-dark: #121212;
    --bg-card: #1a1a1a;
    --text-white: #ffffff;
    --text-grey: #b3b3b3;
    --gold-gradient: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    --gold-solid: #c5a059;
    --transition: all 0.4s ease-in-out;
    /* ألوان الأيقونات الملونة */
    --facebook-color: #3b5998;
    --twitter-color: #00acee;
    --instagram-color: #c13584;
    --tiktok-color: #000000;
    --whatsapp-color: #25d366;
}

/* تم دمج كل الخطوط هنا ليتم تحميلها مرة واحدة */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@700&family=Ruwudu:wght@700&display=swap');


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    overflow-x: hidden;
    font-family: 'Tajawal', sans-serif;
}

/* التنسيق الأساسي للحاويات */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 100px 0;
}

/* ====================================================================
   [2] الهيدر والشعار وشريط التنقل (Header & Navigation)
   ==================================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.98);
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    height: 80px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* الشعار والتزيين (Logo & Ornamentation) */
.logo-img {
    width: 85px;
    height: auto;
    color: #874242;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.logo i {
    color: var(--gold-solid);
    font-size: 2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
}

/* 'المحامية' فوق الاسم */
.logo-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.0rem;
    color: var(--text-white);
    font-weight: 700;
    line-height: 1;
    margin-top: 0;
}

/* اسم المحامية بالخط الجديد (Aref Ruqaa) */
.logo-name-style {
    font-family: 'Ruwudu', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    line-height: 1.1;
    color: var(--gold-solid);
    text-shadow: none;
}

/* تنسيق العبارة الجديدة تحت الاسم */
.logo-subtext {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    color: var(--text-grey);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.logo-name {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

/* قائمة التنقل */
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    height: 100%;
}

.nav-links>li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: var(--transition);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:not(.btn-gold):hover {
    color: var(--gold-solid);
}

/* القائمة المنسدلة (Dropdown) */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #0f0f0f;
    width: 260px;
    border-top: 3px solid var(--gold-solid);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
}

.nav-links>li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 12px 20px;
    display: block;
    color: #ccc;
    font-size: 0.95rem;
    border-bottom: 1px solid #222;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #1a1a1a;
    color: var(--gold-solid);
    padding-right: 25px;
}


/* ====================================================================
   [3] أنماط الأزرار والعناوين الخاصة (Buttons & Special Titles)
   ==================================================================== */
.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-desc {
    color: var(--text-grey);
    font-size: 1.2rem;
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 600px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.gold-subtitle {
    color: var(--gold-solid);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.text-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-3d {
    /* تأثير 3D لـ (روح القانون) */
    color: var(--gold-solid);
    display: inline-block;
    font-weight: 900;
    text-shadow: 1px 1px 0 #333, 2px 2px 0 #333, 3px 3px 0 #333, 4px 4px 0 #333, 5px 5px 0 rgba(197, 160, 89, 0.5);
}

/* الأزرار الذهبية (موحدة لحجز الموعد والاستشارة) */
.btn-gold,
.btn-dark-gold {
    background: var(--gold-gradient);
    /* تدرج ذهبي */
    color: #000;
    /* نص أسود */
    padding: 10px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
    font-weight: bold;
    transition: all 0.5s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-gold:hover,
.btn-dark-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.5);
}

/* الأزرار الشفافة */
.btn-outline {
    background: transparent;
    border: 2px solid var(--gold-solid);
    color: var(--gold-solid);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--gold-solid);
    color: black;
}


.btn-group {
    display: flex;
    gap: 20px;
}


/* ====================================================================
   [4] الواجهة الرئيسية والصور (Hero & Image Styling)
   ==================================================================== */
.hero {
    position: relative;
    padding: 180px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -2;
    filter: brightness(0.5);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.3);
    z-index: -1;
}

.hero-grid,
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

/* إطار الصورة الفني - Desktop */
.img-frame {
    border: 3px solid var(--gold-solid);
    position: relative;
    z-index: 1;
    box-shadow: 30px 30px 0 rgba(197, 160, 89, 0.1);
    border-radius: 10px;
}

.img-frame img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    display: block;
    position: relative;
    top: -40px;
    left: -40px;
    border: 1px solid #333;
    background: #111;
    border-radius: 10px;
}


/* ====================================================================
   [5] قسم الخدمات وعرض المميزات (Services & Features)
   ==================================================================== */
.about-section {
    background-color: var(--bg-dark);
}

.services-section {
    background-color: var(--bg-black);
}

/* تم تغيير الشبكة إلى 3 أعمدة لعرض 6 بطاقات */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: #1a1a1a;
    padding: 40px 20px;
    border: 1px solid #333;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    color: var(--text-white);
}

.service-card:hover {
    border-color: var(--gold-solid);
    transform: translateY(-10px);
    background: #202020;
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.15);
}

.service-card i {
    font-size: 3.5rem;
    color: var(--gold-solid);
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover i {
    transform: scale(1.1) rotate(5deg);
    color: #fff;
}

.service-card h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-grey);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* مزايا الإدارة والعقود (management-features) */
.management-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
}

.feature-item span {
    color: var(--text-grey);
    font-weight: 500;
    font-size: 1.1rem;
}

.feature-item i {
    color: var(--gold-solid);
    font-size: 1.2rem;
}


/* ====================================================================
   [6] أقسام متخصصة (Philosophy, Testimonials, FAQ)
   ==================================================================== */
.philosophy-content .quote {
    display: block;
    font-size: 1.2rem;
    color: var(--text-white);
    margin: 25px auto;
    padding: 15px 25px;
    max-width: 700px;
    border-right: 3px solid var(--gold-solid);
    background: #151515;
    font-style: italic;
}

.philosophy-content p {
    color: var(--text-grey);
    line-height: 2;
    font-size: 1.1rem;
}

/* الأسئلة الشائعة (FAQ) - العرض الكامل */
.faq-list-full-width {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: right;
    margin-top: 40px;
}

.faq-item {
    background: var(--bg-dark);
    padding: 25px;
    border-radius: 10px;
    border-right: 5px solid var(--gold-solid);
    text-align: right;
}

.faq-item h4 {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item h4 i {
    color: var(--gold-solid);
    font-size: 1.5rem;
}

.faq-item p {
    color: var(--text-grey);
    line-height: 1.7;
    font-size: 1rem;
    padding-right: 25px;
}


/* ====================================================================
   [7] قسم التواصل ونموذج الحجز (Contact & Booking)
   ==================================================================== */
.contact-form {
    background: #1a1a1a;
    padding: 40px;
    border: 1px solid #333;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 15px;
    background: #0a0a0a;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

/* زر الإرسال داخل النموذج يتبع النمط الذهبي الموحد */
.contact-form button {
    width: 100%;
    padding: 15px;
    background: var(--gold-gradient);
    color: var(--bg-black);
    /* نص أسود */
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-form button:hover {
    background: var(--gold-solid);
    transform: translateY(-2px);
}

/* تنسيق أيقونات السوشيال ميديا لتكون ملونة */
.social-icon {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    color: var(--text-white) !important;
    /* لون افتراضي قبل الهوفر */
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon .fa-facebook:hover {
    color: var(--facebook-color) !important;
}

.social-icon .fa-twitter:hover {
    color: var(--twitter-color) !important;
}

.social-icon .fa-instagram:hover {
    /* استخدام تدرج لوني إنستجرام عند الهوفر */
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--instagram-color) !important;
}

.social-icon .fa-tiktok:hover {
    color: var(--tiktok-color) !important;
}

.social-icon .fa-whatsapp:hover {
    color: var(--whatsapp-color) !important;
}

/* تنسيق الخريطة وبيانات التواصل (Contact & Map Layout) */
.contact-map-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* Details column slightly wider than map */
    gap: 30px;
    margin-top: 40px;
    text-align: right;
    align-items: stretch;
    /* Ensure columns stretch to fill height */
}

.contact-details-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    border-radius: 8px;
    background-color: var(--bg-dark);
}

.contact-item {
    padding: 15px 0;
    border-bottom: 1px solid #333;
    /* Separator line for each detail item */
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--gold-solid);
    margin-bottom: 8px;
    display: block;
}

.contact-item p {
    color: var(--text-grey);
    margin-bottom: 5px;
    line-height: 1.6;
}

.contact-item a {
    color: var(--gold-solid);
    font-weight: 500;
    text-decoration: none;
}

.map-placeholder-col {
    height: 450px;
    /* Fixed height for a balanced look */
    border: 1px solid var(--gold-solid);
    border-radius: 8px;
    overflow: hidden;
}

/* تنسيق iframe الخريطة لضمان ملء المساحة بشكل كامل */
.map-placeholder-col iframe {
    width: 100%;
    height: 100%;
}

/* الفوتر */
footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid #222;
    margin-top: 50px;
    color: #666;
    background: #0a0a0a;
}


/* ====================================================================
   [8] التجاوب (Media Queries) - التعديلات النهائية
   ==================================================================== */
.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--gold-solid);
    cursor: pointer;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .management-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    /* الشعار في الموبايل - تحسين الضغط ووضوح الخطوط */
    .logo-img {
        width: 70px;
    }

    .logo-text {
        align-items: flex-start;
    }

    .logo-title {
        font-size: 0.9rem;
    }

    .logo-name-style {
        font-size: 1.2rem;
    }

    .logo-subtext {
        font-size: 0.7rem;
        margin-top: 0px;
    }

    /* قائمة التنقل في الموبايل */
    .nav-links {
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background: #0a0a0a;
        flex-direction: column;
        height: auto;
        padding: 0;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a:not(.btn-gold) {
        padding: 15px 20px;
        border-bottom: 1px solid #1a1a1a;
        width: 100%;
    }

    .nav-links a.btn-gold {
        margin: 15px 20px;
        display: block;
        text-align: center;
    }

    /* القائمة المنسدلة في الموبايل */
    .dropdown-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        display: none;
        background: #111;
        box-shadow: none;
        border-top: none;
        width: 100%;
        padding: 0;
        transform: translateY(0);
        border-radius: 0;
    }

    .dropdown-menu a {
        padding-right: 40px;
    }

    .dropdown-link.open .dropdown-menu {
        display: block;
    }

    .dropdown-link .fa-chevron-down {
        transition: transform 0.3s;
    }

    .dropdown-link.open .fa-chevron-down {
        transform: rotate(-180deg);
    }

    /* تخطيط Hero و About: عمود واحد */
    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-grid .hero-img-wrapper {
        order: -1;
    }

    .about-grid .about-text {
        order: 2;
    }

    .hero-text,
    .about-text {
        text-align: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-desc {
        max-width: 100%;
    }

    .btn-group {
        justify-content: center;
    }

    /* **تصحيح الصورة: إطار مرن وصورة ظاهرة بالكامل** */
    .hero-img-wrapper,
    .about-grid .hero-img-wrapper {
        display: block;
        height: auto;
        max-width: 90%;
        margin: 0 auto;
    }

    .img-frame {
        height: 350px;
        /* تحديد ارتفاع واضح للإطار */
        box-shadow: 15px 15px 0 rgba(197, 160, 89, 0.1);
    }

    .img-frame img {
        height: 100%;
        width: 100%;
        position: relative;
        /* إزالة الـ absolute */
        top: -20px;
        left: -20px;
        object-fit: contain;
        /* **يضمن ظهور الصورة كاملة** */
    }

    /* نهاية تصحيح الصورة */

    /* =================================================
       تعديل بيانات التواصل والخريطة للموبايل (تم الإصلاح هنا)
       ================================================= */
    .contact-map-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .contact-details-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* سنترة العناصر أفقياً */
        text-align: center;
        order: 2;
        /* جعل البيانات أسفل الخريطة */
        padding: 20px;
    }

    /* جعل كل عنصر (أيقونة + نص) في منتصف الشاشة */
    .contact-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
        padding: 20px 0;
    }

    .contact-item i {
        margin-bottom: 10px;
        font-size: 2rem;
        margin-right: 0;
        /* إلغاء أي هوامش جانبية */
        margin-left: 0;
    }

    .contact-item p,
    .contact-item a {
        width: 100%;
        text-align: center;
        display: block;
    }

    .map-placeholder-col {
        height: 300px;
        order: 1;
        /* الخريطة تظهر أولاً */
        width: 100%;
    }

    /* شبكة الخدمات */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .service-card {
        padding: 30px 15px;
    }
}

/* الشاشات الأصغر (iPhone SE/Small Phones) */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 25px 15px;
    }

    .management-features {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
        gap: 15px;
    }

    /* **تصحيح الصورة: إطار مرن وصورة ظاهرة بالكامل** */
    .img-frame {
        box-shadow: 10px 10px 0 rgba(197, 160, 89, 0.1);
        height: 280px;
        /* تصغير الارتفاع على أصغر الشاشات */
    }

    .img-frame img {
        top: -15px;
        left: -15px;
    }

    /* نهاية تصحيح الصورة */
}