/* ==========================================================================
   1. متغيرات الهوية البصرية والألوان (CSS Variables)
   ========================================================================== */
:root {
    --bg-primary: #f8fafc;        /* لون الخلفية الأساسية للموقع */
    --bg-surface: #ffffff;        /* لون خلفية القوائم والقرى البيضاء */
    --bg-dark: #0f172a;           /* الكحلي الفاخر للكروت والتذييل */
    --text-main: #334155;         /* لون النصوص الفرعية */
    --text-dark: #0f172a;         /* لون العناوين والنصوص الداكنة */
    --color-accent: #d97706;      /* اللون الذهبي المخصص للمحاماة */
    --color-accent-hover: #b45309;
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-sans: ui-sans-serif, system-ui, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. الإعدادات العامة والتصفير (Reset)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-main);
}

body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   3. شريط التنقل وقائمة الهامبرغر (Navbar & Hamburger)
   ========================================================================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #f1f5f9;
}

.nav-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 2px;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

.menu-checkbox {
    display: none;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 100;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 9999px;
    transition: var(--transition-smooth);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 2rem;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--text-dark);
}

/* ==========================================================================
   4. قسم الترحيب البصري (Hero Section)
   ========================================================================== */
.hero-section {
    max-width: 1150px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fef3c7;
    border: 1px solid rgba(217, 119, 6, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-main);
    max-width: 42rem;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--bg-dark);
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: #1e293b;
    transform: translateY(-2px);
}

.hero-image-wrapper {
    position: relative;
}

.image-shadow-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, var(--color-accent), var(--bg-dark));
    border-radius: 1rem;
    transform: rotate(3deg) scale(1.02);
    opacity: 0.1;
    transition: var(--transition-smooth);
}

.hero-image-wrapper:hover .image-shadow-bg {
    transform: rotate(6deg);
}

.image-container {
    width: 18rem;
    height: 18rem;
    position: relative;
    z-index: 10;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.image-container img:hover {
    transform: scale(1.05);
}
/* ==========================================================================
   5. قسم الخدمات والتخصصات (Services Section)
   ========================================================================== */
.services-section {
    background-color: var(--bg-surface);
    padding: 6rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.section-title-wrapper {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 4rem auto;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.section-divider {
    width: 4rem;
    height: 4px;
    background-color: var(--color-accent);
    margin: 0 auto;
    border-radius: 9999px;
}

.services-grid {
    max-width: 1150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    background-color: rgba(248, 250, 252, 0.5);
    transition: var(--transition-smooth);
}

.service-card:hover {
    background-color: var(--bg-surface);
    border-color: var(--bg-surface);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.icon-box.amber { background-color: #fef3c7; color: var(--color-accent); }
.icon-box.red { background-color: #fee2e2; color: #dc2626; }

.service-card:hover .icon-box.amber { background-color: var(--color-accent); color: #fff; }
.service-card:hover .icon-box.red { background-color: #dc2626; color: #fff; }

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* ==========================================================================
   6. قسم بيانات الاتصال والنموذج (Contact Section)
   ========================================================================== */
.contact-section {
    max-width: 1150px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-card {
    background-color: var(--bg-dark);
    color: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #1e293b;
}

.info-header {
    border-bottom: 1px solid #1e293b;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.info-header h4 {
    font-family: var(--font-serif);
    color: var(--color-accent);
    font-size: 1.125rem;
}

.info-header p {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.info-row {
    display: flex;
    align-items: start;
    gap: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.info-row a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.info-row a:hover {
    color: var(--color-accent);
}

.contact-form {
    background-color: var(--bg-surface);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background-color: #f8fafc;
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    background-color: #fff;
    outline: none;
    border-color: var(--text-dark);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

.btn-submit {
    width: 100%;
    background-color: var(--bg-dark);
    color: #fff;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.05);
    transition: var(--transition-smooth);
}

.btn-submit:hover {
    background-color: #000;
}

/* ==========================================================================
   7. تذييل الموقع والحقوق (Footer)
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: #64748b;
    padding: 2.5rem 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1150px;
    margin: 0 auto;
}

.footer-container p { 
    margin-bottom: 0.75rem; 
}

.footer-laws { 
    color: #475569; 
}

.footer-rights { 
    color: #94a3b8; 
    letter-spacing: 0.02em; 
}

.footer-dev a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.footer-dev a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   8. شاشات التجاوب والـ Media Queries للمقاسات المختلفة
   ========================================================================== */

@media (max-width: 767px) {
    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background-color: var(--bg-surface);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid #f1f5f9;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition-smooth);
        pointer-events: none;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 1.125rem;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .menu-checkbox:checked ~ .nav-links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .menu-checkbox:checked ~ .hamburger-btn .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-checkbox:checked ~ .hamburger-btn .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .menu-checkbox:checked ~ .hamburger-btn .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (min-width: 768px) {
    .hero-section { 
        flex-direction: row; 
        text-align: left; 
        padding: 8rem 1.5rem; 
    }
    
    .hero-content { 
        text-align: left; 
    }
    
    .hero-title { 
        font-size: 3.5rem; 
    }
    
    .image-container { 
        width: 24rem; 
        height: 24rem; 
    }
    
    .services-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .contact-grid { 
        grid-template-columns: repeat(5, 1fr); 
    }
    
    .contact-info-card { 
        grid-column: span 2; 
    }
    
    .contact-form { 
        grid-column: span 3; 
    }
    
    .form-row-2 { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* ==========================================================================
   9. زر الواتساب العائم المطور (Floating WhatsApp Button)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.75rem;
    height: 3.75rem;
    background-color: #25d366; /* لون أخضر واتساب الرسمي */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 999; /* لضمان بقائه فوق كروت الاتصال والتذييل */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

/* تأثير التكبير والإضاءة الفخم عند تمرير الماوس */
.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* ضبط حجم وحركة الأيقونة عند فتح شاشات الهواتف المحمولة */
@media (max-width: 767px) {
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3.25rem;
        height: 3.25rem;
    }
}
