/* ==========================================================================
   نظام شركة المحاماة السعودية - الأنماط الرئيسية
   ========================================================================== */

/* المتغيرات */
:root {
    --primary-color: #b8860b;
    --secondary-color: #1a2332;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* إعادة تعيين الأنماط */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    direction: rtl;
    text-align: right;
}

/* الحاوية */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الرأس (Header) */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-link {
    padding: 0;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/**nav-dropdown*/
 .nav-dropdown{
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle i{
    margin-right: 6px;
    font-size: 0.85em;
}

.nav-dropdown .dropdown-menu{
    list-style: none;
    margin: 0;
    padding: 10px;
    min-width: 260px;

    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .2s ease;
    z-index: 2000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown .dropdown-menu li{
    margin: 0;
    padding: 0;
}

.nav-dropdown .dropdown-menu li a{
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;
    border-radius: 10px;

    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all .2s ease;
}

.nav-dropdown .dropdown-menu li a:hover{
    background: var(--light-bg);
    color: var(--primary-color);
}

/*nav-dropdown**/

/* Brand (logo + text) */
.brand{
     justify-content: flex-end;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
  }
  
   .brand-logo{
    width: clamp(34px, 3.5vw, 56px);
    height: clamp(34px, 3.5vw, 56px);
    object-fit: contain;
    flex: 0 0 auto;
  }
  
   .brand-text{
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: right;
  }
  
   .brand-name{
    font-weight: 800;
    font-size: clamp(16px, 1.2vw, 22px);
    white-space: nowrap;
  }
  
   .brand-sub{
    font-weight: 700;
    font-size: clamp(12px, 0.95vw, 16px);
    opacity: 0.95;
    white-space: nowrap;
  }
  
  /* Mobile: avoid squeezing */
  @media (max-width: 576px){
    .brand{
      gap: 10px;
    }
    .brand-text{
      max-width: 220px;
    }
    .brand-sub{
      white-space: normal;    /* يسمح بسطرين */
    }
  }
  

/* الأزرار */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #9a6f0a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
    width: 100%;
}

  /* قسم البطل (Hero) */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2c3e50 100%);
    color: var(--white);
    padding: clamp(70px, 9vw, 110px) 0; /* متجاوب بدل رقم ثابت */
    text-align: center;
}

 .hero-logo{
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
}

 .hero-logo-img{
    width: clamp(72px, 10vw, 120px);
    height: clamp(72px, 10vw, 120px);
    object-fit: contain;
    display: block;

    /* يعطي وضوح وعمق بدون ما يغيّر الهوية */
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

 .hero-content h1 {
    font-size: clamp(1.7rem, 3.2vw, 3rem); /* متجاوب */
    margin-bottom: 16px;
    font-weight: 800;
    line-height: 1.2;
}

 .hero-content p {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    margin-bottom: 26px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    opacity: .95;
    padding: 0 12px; /* مريح للجوال */
}
 

/* قسم الإحصائيات */
.stats-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* قسم من نحن */
.about-section {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.about-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.about-content h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.features-list {
    list-style: none;
}

.features-list li {
    padding: 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.features-list i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* قسم الخدمات */
.services-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #d4a017);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-price {
    margin: 20px 0;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* قسم نموذج الاستشارة */
.consultation-form-section {
    padding: 80px 0;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.required {
    color: var(--error-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* قسم التواصل الاجتماعي */
.social-section {
    padding: 60px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.social-section h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* التذييل (Footer) */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section p,
.footer-section li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section i {
    margin-left: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* التنبيهات */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* صفحات المصادقة */
.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
    background-color: var(--light-bg);
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-color);
}

.auth-form {
    margin-top: 30px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}
