:root {
  --primary: #2d5be3;
  --primary-light: #4f7aed;
  --primary-dark: #1e43c4;
  --foreground: #1e2433;
  --card-bg: #f7f8fc;
}

body {
  font-family: 'Cairo', 'IBM Plex Sans Arabic', 'Inter', sans-serif;
  color: var(--foreground);
}

html[dir="ltr"] body {
  font-family: 'Inter', sans-serif;
}

.hero-gradient {
  background: linear-gradient(135deg, #1e3fa8 0%, #2d5be3 45%, #4a7cf7 100%);
  position: relative;
  overflow: hidden;
}

.page-hero {
  padding-bottom: 100px !important;
}

@media (max-width: 767.98px) {
  .page-hero {
    padding-bottom: 80px !important;
  }
  .page-hero h1.display-5 {
    font-size: 1.75rem;
  }
  .page-hero .lead {
    font-size: .95rem;
  }
}

.glass-card {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  border-radius: .75rem;
  padding: 1rem 1.5rem;
}

.section-underline {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  margin: .75rem auto 0;
}

#mainNav {
  transition: background .3s, box-shadow .3s;
}

#mainNav .nav-link {
  font-size: .85rem;
  padding: .5rem .6rem;
  white-space: nowrap;
}

#mainNav.scrolled {
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
}

#mainNav.scrolled .nav-link {
  color: var(--foreground) !important;
}

#mainNav.scrolled .navbar-toggler {
  border-color: rgba(0, 0, 0, .2);
}

#mainNav.scrolled .navbar-toggler-icon {
  filter: none;
}

.navbar-toggler-icon {
  filter: brightness(10);
}

#mainNav.scrolled #langToggle {
  color: var(--foreground);
  border-color: var(--foreground);
}

#mainNav.scrolled .btn-cta-nav {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-cta-nav {
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff;
  padding: .4rem 1.2rem;
  border-radius: .5rem;
  font-size: .9rem;
  font-weight: 600;
  transition: all .3s;
}

.btn-cta-nav:hover {
  background: #fff;
  color: var(--primary);
}

#langToggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff;
  padding: .35rem 1rem;
  border-radius: .5rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .3s;
}

#langToggle:hover {
  background: rgba(255, 255, 255, .15);
}

.service-card {
  transition: border-color .25s, box-shadow .25s;
  border: 1px solid #e9ecef;
}

.service-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(45, 91, 227, .12);
}

.service-card .card-more {
  opacity: 0;
  transition: opacity .25s;
}

.service-card:hover .card-more {
  opacity: 1;
}

.icon-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.icon-box-lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  font-size: 1.6rem;
}

.client-logo {
  filter: grayscale(100%);
  opacity: .65;
  height: 48px;
  transition: filter .3s, opacity .3s;
}

.client-logo:hover {
  filter: none;
  opacity: 1;
}

.dot-grid {
  background-image: radial-gradient(circle, rgba(255, 255, 255, .07) 1px, transparent 0);
  background-size: 40px 40px;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee-wrapper {
  overflow: hidden;
  direction: ltr;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
  gap: 0;
}

.marquee-track.marquee-clients {
  animation-duration: 30s;
}

.marquee-track.marquee-testimonials {
  animation-duration: 40s;
}

.testimonials-wrapper {
  position: relative;
}

.testimonial-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  min-width: 340px;
  max-width: 380px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.testimonial-quote {
  font-family: Georgia, serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--primary);
  margin-bottom: -.5rem;
  opacity: .3;
}

.testimonial-text {
  font-size: .95rem;
  color: #444;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
}

.testimonial-author {
  font-weight: 700;
  font-size: .95rem;
  color: var(--dark);
}

.testimonial-title {
  font-size: .82rem;
  color: #888;
  margin-top: 2px;
}

.blog-card {
  transition: transform .2s, box-shadow .2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1) !important;
}

.blog-card-title {
  transition: color .2s;
  line-height: 1.6;
}

.blog-card-title:hover {
  color: var(--primary) !important;
}

.blog-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}

.calc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.calc-header {
  background: linear-gradient(135deg, #1e3fa8 0%, #2d5be3 100%);
  color: #fff;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calc-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, .15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.calc-body {
  padding: 1.5rem;
  flex: 1;
}

.calc-result {
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.calc-breakdown {
  margin-bottom: 1rem;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  font-size: .9rem;
  color: #555;
  border-bottom: 1px dashed #eee;
}

.calc-row:last-child {
  border-bottom: none;
}

.calc-total {
  background: linear-gradient(135deg, #e8eefb 0%, #f0f4ff 100%);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  gap: .75rem;
}

.calc-total-value {
  font-size: 1.25rem;
  white-space: nowrap;
  text-align: end;
}

@media (max-width: 575.98px) {
  .calc-total {
    flex-direction: column;
    text-align: center;
    gap: .25rem;
  }
  .calc-total-value {
    font-size: 1.5rem;
  }
  .calc-row {
    font-size: .82rem;
  }
}

.blog-post-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #333;
}

.blog-post-content p {
  margin-bottom: 1rem;
}

.hero-section {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 120px;
}

.hero-blob-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, .08) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-blob-2 {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, .05) 0%, transparent 70%);
  bottom: 50px;
  left: -100px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

.badge-pill-hero {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  padding: .5rem 1.5rem;
  border-radius: 50px;
  font-size: .9rem;
  display: inline-block;
  backdrop-filter: blur(4px);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: .85rem;
  opacity: .85;
}

.ticker-item {
  padding: .6rem 1.5rem;
  white-space: nowrap;
  font-size: .95rem;
  color: #555;
}

.ticker-dot {
  color: var(--primary);
  font-size: .5rem;
  display: flex;
  align-items: center;
  padding: 0 .5rem;
}

.why-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  padding: 1.5rem;
  height: 100%;
  transition: border-color .25s, box-shadow .25s;
}

.why-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(45, 91, 227, .12);
}

.consultation-section {
  position: relative;
  overflow: hidden;
}

.badge-pill-consult {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  padding: .4rem 1.2rem;
  border-radius: 50px;
  font-size: .85rem;
  display: inline-block;
}

.consult-stat-box {
  background: rgba(255, 255, 255, .12);
  border: 1.5px solid rgba(255, 255, 255, .25);
  border-radius: 16px;
  padding: 1.2rem 2rem;
  min-width: 180px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.consult-stat-label {
  font-size: .85rem;
  opacity: .8;
  margin-bottom: .35rem;
  font-weight: 500;
}

.consult-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.consult-cta-btn {
  border-radius: 50px;
  padding: .75rem 2.5rem;
  border-width: 2px;
  font-size: 1.05rem;
  transition: all .3s ease;
}

.consult-cta-btn:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.clients-wrapper {
  position: relative;
}

.clients-fade-left,
.clients-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.clients-fade-left {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.clients-fade-right {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.footer-section {
  background: #1e2433;
  color: #fff;
}

.footer-section a {
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
  transition: color .3s;
  font-size: .9rem;
}

.footer-section a:hover {
  color: #fff;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.newsletter-input {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  border-radius: .5rem;
  padding: .5rem .75rem;
  font-size: .85rem;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, .5);
}

.newsletter-input:focus {
  background: rgba(255, 255, 255, .15);
  border-color: var(--primary-light);
  color: #fff;
  box-shadow: none;
  outline: none;
}

.btn-newsletter {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: .5rem;
  padding: .5rem 1rem;
  font-size: .85rem;
  cursor: pointer;
  transition: background .3s;
}

.btn-newsletter:hover {
  background: var(--primary-dark);
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .hero-blob-1,
  .hero-blob-2 {
    display: none;
  }

  #mainNav .navbar-collapse {
    background: rgba(255, 255, 255, .97);
    padding: 1rem;
    border-radius: .5rem;
    margin-top: .5rem;
  }

  #mainNav .navbar-collapse .nav-link {
    color: var(--foreground) !important;
  }
}

.service-request-form .form-control {
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: .95rem;
  transition: border-color .3s, box-shadow .3s;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"] {
  direction: rtl;
  text-align: right;
}

.service-request-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(45, 91, 227, .15);
}

a.service-card {
  cursor: pointer;
}

a.service-card:hover {
  text-decoration: none;
}

.lawyer-profile-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid rgba(255, 255, 255, .3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
}

.lawyer-detail-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.lawyer-detail-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.lawyer-detail-label {
  font-size: .78rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: .15rem;
}

.lawyer-detail-value {
  font-weight: 600;
  font-size: .95rem;
  color: var(--foreground);
}

.lawyer-spec-badge {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid #e2e6ea;
  color: var(--foreground);
  font-size: .78rem;
  padding: .25rem .6rem;
  border-radius: 6px;
  font-weight: 500;
}
