/* ===== متغيرات الألوان والخطوط ===== */
:root {
  --primary-color: #1a365d; /* أزرق داكن أنيق */
  --secondary-color: #2c5282;
  --accent-color: #c53030; /* أحمر داكن */
  --text-color: #2d3748;
  --light-bg: #f7fafc;
  --white: #ffffff;
  --gray: #edf2f7;
  --dark-gray: #718096;
  --gold: #d69e2e; /* لون ذهبي لللمسات الفاخرة */
}

/* ===== الخطوط الأساسية ===== */
@font-face {
  font-family: 'Tajawal';
  src: url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
}

/* ===== إعادة ضبط الأساسيات ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', Arial, sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background: var(--light-bg);
  text-align: right;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== أنماط الهيدر ===== */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 10px 0;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.office-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.title-container h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.title-container p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.header-contacts {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.header-contacts a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  transition: all 0.3s;
}

.header-contacts a:hover {
  color: var(--gold);
  transform: translateY(-2px);
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
  transition: transform 0.3s;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 15px 0 0;
}

nav ul li a {
  color: var(--white);
  text-decoration: none;
  padding: 0.8rem 1.3rem;
  display: block;
  transition: all 0.3s;
  font-weight: 500;
  position: relative;
}

nav ul li a:hover {
  color: var(--gold);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 1.3rem;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

nav ul li a:hover::after {
  width: 50%;
}

/* ===== قسم البطل (Hero) ===== */
.hero {
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(247, 250, 252, 0.95) 0%, rgba(237, 242, 247, 0.95) 100%), 
              url('images/law-pattern.png') center/cover;
}

.profile-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.profile-text {
  flex: 1;
  animation: fadeInRight 1s ease;
}

.profile-text h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 25px;
  line-height: 1.3;
  position: relative;
}

.profile-text h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 100px;
  height: 4px;
  background: var(--accent-color);
}

.profile-text p {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 30px;
}

.achievements {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.achievements li {
  position: relative;
  padding-right: 30px;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.achievements li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23c53030"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>') no-repeat;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent-color);
  color: var(--white);
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  margin-top: 20px;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(197, 48, 48, 0.3);
}

.cta-button:hover {
  background: #9b2c2c;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(197, 48, 48, 0.4);
}

.profile-image {
  position: relative;
  width: 380px;
  height: 480px;
  flex-shrink: 0;
  animation: fadeInLeft 1s ease;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transition: transform 0.5s;
  border: 5px solid var(--white);
}

.profile-image img:hover {
  transform: scale(1.03);
}

.badge {
  position: absolute;
  bottom: -20px;
  left: 30px;
  background: var(--gold);
  color: var(--white);
  padding: 12px 25px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(214, 158, 46, 0.3);
  font-weight: bold;
  font-size: 1.1rem;
  animation: pulse 2s infinite;
}

.badge i {
  font-size: 1.3rem;
}

/* ===== قسم عن المكتب ===== */
.about-office {
  padding: 100px 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.about-office::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: var(--light-bg);
  z-index: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 30% 100%);
}

.about-office .container {
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.office-image {
  flex: 1;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s;
}

.office-image:hover {
  transform: translateY(-10px);
}

.office-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s;
}

.office-image:hover img {
  transform: scale(1.05);
}

.office-info {
  flex: 1;
}

.office-info h2 {
  color: var(--primary-color);
  font-size: 2.3rem;
  margin-bottom: 25px;
  position: relative;
}

.office-info h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 80px;
  height: 4px;
  background: var(--accent-color);
}

.office-info p {
  color: var(--text-color);
  line-height: 1.9;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.contact-method {
  display: flex;
  gap: 20px;
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-method:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(197, 48, 48, 0.2);
}

.contact-method i {
  font-size: 28px;
  color: var(--accent-color);
  margin-top: 5px;
}

.contact-method h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.contact-method a, .contact-method p {
  color: var(--text-color);
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
  transition: color 0.3s;
}

.contact-method a:hover {
  color: var(--accent-color);
}

/* ===== قسم الخدمات ===== */
.services {
  padding: 100px 0;
  background: var(--light-bg);
  position: relative;
}

.services h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 60px;
  font-size: 2.5rem;
  position: relative;
}

.services h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: 50%;
  transform: translateX(50%);
  width: 100px;
  height: 4px;
  background: var(--accent-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(197, 48, 48, 0.2);
}

.service-card i {
  font-size: 3.5rem;
  color: var(--accent-color);
  margin-bottom: 25px;
  transition: transform 0.3s;
}

.service-card:hover i {
  transform: scale(1.1);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.6rem;
  position: relative;
  padding-bottom: 15px;
}

.service-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 50px;
  height: 3px;
  background: var(--gold);
}

.service-card p {
  color: var(--dark-gray);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* ===== قسم التواصل ===== */
.contact {
  padding: 100px 0;
  background: var(--white);
  position: relative;
}

.contact h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 60px;
  font-size: 2.5rem;
  position: relative;
}

.contact h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: 50%;
  transform: translateX(50%);
  width: 100px;
  height: 4px;
  background: var(--accent-color);
}

.contact-wrapper {
  display: flex;
  gap: 60px;
}

.contact-info {
  flex: 1;
}

.social-media {
  background: var(--light-bg);
  padding: 40px;
  border-radius: 15px;
  margin-bottom: 40px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.social-media h3 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.8rem;
  position: relative;
}

.social-media h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fb-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1877f2;
  color: white;
  padding: 18px 25px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.fb-page:hover {
  background: #166fe5;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
}

.fb-page i {
  font-size: 1.8rem;
  margin-left: 15px;
}

.contact-form {
  flex: 1;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 18px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-size: 1.1rem;
  transition: all 0.3s;
  background: var(--light-bg);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.2);
  background: var(--white);
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 18px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(197, 48, 48, 0.3);
}

.contact-form button:hover {
  background: #9b2c2c;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(197, 48, 48, 0.4);
}

/* ===== الفوتر ===== */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 80px 0 0;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  margin-bottom: 60px;
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.footer-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  font-size: 1.1rem;
}

.footer-links h4,
.footer-contact h4 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.5rem;
  position: relative;
  padding-bottom: 15px;
}

.footer-links h4::after,
.footer-contact h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--gold);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  display: block;
  padding: 8px 0;
  font-size: 1.1rem;
  position: relative;
}

.footer-links a:hover {
  color: var(--gold);
  padding-right: 15px;
}

.footer-links a::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s;
}

.footer-links a:hover::after {
  opacity: 1;
  right: -5px;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
}

.footer-contact i {
  color: var(--gold);
  font-size: 1.3rem;
  width: 25px;
}

.copyright {
  text-align: center;
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

/* ===== زر الواتساب العائم ===== */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #25D366;
  color: white;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
  z-index: 999;
  transition: all 0.3s;
  text-decoration: none;
  animation: pulse-whatsapp 2s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* ===== تأثيرات الحركة والرسوم المتحركة ===== */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ===== التكيف مع الأجهزة المختلفة ===== */
@media (max-width: 1200px) {
  .profile-content,
  .about-office .container,
  .contact-wrapper {
    gap: 40px;
  }
  
  .profile-image {
    width: 320px;
    height: 420px;
  }
}

@media (max-width: 992px) {
  .profile-content,
  .about-office .container,
  .contact-wrapper {
    flex-direction: column;
  }
  
  .profile-image {
    width: 100%;
    height: auto;
    max-width: 500px;
    margin-top: 40px;
  }
  
  .office-image {
    margin-bottom: 40px;
  }
  
  .about-office::before {
    width: 100%;
    height: 40%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 30%);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  nav ul {
    position: fixed;
    top: 100px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 100px);
    background: var(--secondary-color);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    transition: right 0.4s ease;
  }
  
  nav ul.active {
    right: 0;
  }
  
  nav ul li {
    width: 100%;
    text-align: center;
  }
  
  nav ul li a {
    padding: 15px;
  }
  
  .header-contacts {
    flex-direction: column;
    gap: 8px;
  }
  
  .profile-text h2,
  .services h2,
  .contact h2,
  .office-info h2 {
    font-size: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .floating-whatsapp {
    width: 60px;
    height: 60px;
    font-size: 30px;
    bottom: 20px;
    left: 20px;
  }
}

@media (max-width: 576px) {
  .logo-container {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .title-container h1 {
    font-size: 1.3rem;
  }
  
  .contact-methods {
    grid-template-columns: 1fr;
  }
  
  .service-card {
    padding: 30px 20px;
  }
  
  .social-media {
    padding: 30px;
  }
  
  .fb-page {
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    padding: 15px;
  }
}