/* ═══════════════════════════════════════════════════════════════════════════
   International Legal Recovery — Main Stylesheet
   هيكل: Reset | Base | Layout | Components | Sections | Forms | Utilities
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Arial, Tahoma, sans-serif;
  background: #10151c;
  color: #fff;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
  position: relative;
}

/* نقشة مائية أساسية — أيقونة الميزان على كامل الصفحة */
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url('../assets/scale-icon.png') no-repeat center center;
  background-size: min(50vw, 400px);
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Skip Link (Accessibility) ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -60px;
  right: 16px;
  background: #d4af37;
  color: #101216;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  z-index: 10001;
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  width: min(1150px, 92%);
  max-width: 100%;
  margin: auto;
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
}


section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 42px;
}

.section-title h2 {
  font-size: 35px;
  color: #d4af37;
  margin-bottom: 12px;
}

.section-title p {
  max-width: 820px;
  margin: auto;
  color: #c9ced8;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 14, 19, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #d4af37;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.95;
}

.brand-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.brand-en {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #D4AF37;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.brand-ar {
  font-family: 'Amiri', serif;
  font-size: 18px;
  font-weight: 700;
  color: #D4AF37;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}


.nav-list {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.nav-list li a {
  display: block;
  color: #e8ecf1;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.2);
  transition: 0.25s;
}

.nav-list li a:hover {
  color: #d4af37;
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.35);
}

/* زر القائمة (3 شرطات) — يظهر على الجوال فقط */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s;
}

.nav-toggle:hover,
.nav-toggle:focus {
  background: rgba(212,175,55,0.2);
  border-color: rgba(212,175,55,0.5);
  outline: 2px solid rgba(212,175,55,0.5);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #d4af37;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(212,175,55,0.18), transparent 25%),
    radial-gradient(circle at left center, rgba(255,255,255,0.05), transparent 25%),
    linear-gradient(135deg, #0b0e13 0%, #111723 100%);
  padding: 70px 0;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-image-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(212,175,55,0.35);
  background: rgba(212,175,55,0.08);
  border-radius: 999px;
  color: #f0d98a;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 48px;
  line-height: 1.35;
  margin-bottom: 18px;
}

.hero h1 span {
  color: #d4af37;
}

.hero p {
  color: #d3d6dc;
  font-size: 18px;
  max-width: 760px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hero-points div {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px;
  color: #e4e4e4;
  font-size: 14px;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

.hero-card h2,
.hero-card h3 {
  color: #d4af37;
  font-size: 24px;
  margin-bottom: 16px;
}

.hero-card ul {
  list-style: none;
}

.hero-card li {
  padding-right: 20px;
  position: relative;
  margin-bottom: 12px;
  color: #ececec;
}

.hero-card li::before {
  content: "•";
  position: absolute;
  right: 0;
  color: #d4af37;
  font-size: 22px;
  line-height: 1;
  top: 2px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  border: none;
  cursor: pointer;
  padding: 15px 26px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  transition: 0.25s;
  display: inline-block;
}

.btn-primary {
  background: #d4af37;
  color: #101216;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(212,175,55,0.55);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ── Cards (Services) ────────────────────────────────────────────────────── */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: #141923;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 24px;
  transition: 0.25s;
}

.card-icon {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.25);
  flex-shrink: 0;
}

.card-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #fff;
}

.card p {
  color: #d0d4db;
  font-size: 15px;
}

/* ── Article ────────────────────────────────────────────────────────────── */
.article {
  background: #10141c;
}

.article-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.article-main,
.article-side {
  background: #151b25;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 28px;
}

.article-main h3,
.article-side h3 {
  color: #d4af37;
  margin-bottom: 14px;
  font-size: 24px;
}

.article-side-img {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

.article-side-img img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.article-side h3.mt-block {
  margin-top: 22px;
}

.article-main h4 {
  color: #fff;
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 20px;
}

.article-main p {
  color: #d4d8df;
  margin-bottom: 14px;
}

.article-main ul,
.article-side ul {
  padding-right: 18px;
  color: #d7dbe3;
}

.article-main li,
.article-side li {
  margin-bottom: 10px;
}

/* ── Stats ──────────────────────────────────────────────────────────────── */
.stats {
  background: linear-gradient(135deg, #0f131b, #171d28);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat {
  background: #151a24;
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}

.stat-number {
  font-size: 34px;
  color: #d4af37;
  font-weight: bold;
  margin-bottom: 8px;
}

.stat-label {
  color: #d7dbe3;
  font-size: 15px;
}

/* ── Testimonials ───────────────────────────────────────────────────────── */
.testimonials {
  background: #0c1017;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: #151b25;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: 0.25s;
  display: flex;
  flex-direction: column;
}

.testimonial-card-featured {
  border-color: rgba(212,175,55,0.35);
  box-shadow: 0 8px 32px rgba(212,175,55,0.12);
}

.testimonial-chat {
  background: linear-gradient(180deg, #1a2230 0%, #151b25 100%);
  padding: 20px 16px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 180px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.chat-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(212,175,55,0.4);
}

.chat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.chat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-name {
  color: #e8ecf1;
  font-weight: 600;
  font-size: 14px;
}

.chat-time {
  color: #8a929e;
  font-size: 12px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-bubble.outgoing {
  align-self: flex-end;
  background: rgba(212,175,55,0.2);
  border: 1px solid rgba(212,175,55,0.3);
  border-bottom-left-radius: 4px;
  color: #f0e6d0;
}

.chat-bubble.incoming {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-right-radius: 4px;
  color: #d4dae4;
}

.chat-time-small {
  font-size: 11px;
  color: #7a8290;
  align-self: flex-end;
}

.testimonial-quote {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.testimonial-quote p {
  color: #dde1e8;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial-author .name {
  color: #d4af37;
  font-weight: bold;
  font-size: 15px;
}

.testimonial-author .meta {
  color: #b6bcc7;
  font-size: 13px;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq {
  background: #111620;
}

.faq-grid {
  display: grid;
  gap: 16px;
  max-width: 900px;
  margin: auto;
}

.faq-item {
  background: #171d28;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
}

.faq-item h3 {
  color: #fff;
  margin-bottom: 8px;
  font-size: 19px;
}

.faq-item p {
  color: #d0d4db;
}

/* ── Contact & Form ────────────────────────────────────────────────────── */
.contact {
  background: linear-gradient(135deg, #0d1117, #151b25);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.contact-box,
.form-box {
  background: #151b25;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 28px;
}

.contact-box h3,
.form-box h3 {
  color: #d4af37;
  margin-bottom: 14px;
  font-size: 26px;
}

.form-intro {
  color: #b8bfca;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.field .required {
  color: #e74c3c;
  font-weight: normal;
}

.field .optional {
  color: #8a929e;
  font-weight: normal;
  font-size: 12px;
}

.contact-box p,
.contact-box li {
  color: #d8dce3;
}

.contact-box ul {
  padding-right: 18px;
  margin-top: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 14px;
  background: #0f141c;
  border: 1px solid #2c3442;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #d4af37;
  outline: 2px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.phone-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  align-items: start;
  direction: ltr;
}

.phone-group select {
  min-width: 0;
}

.phone-group input {
  min-width: 0;
}

.phone-hint {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #8a929e;
  margin-top: -4px;
  direction: rtl;
}

.field-phone .phone-group {
  position: relative;
}

.country-select {
  position: relative;
  width: 100%;
}

.country-select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: #0f141c;
  border: 1px solid #2c3442;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  min-height: 52px;
}

.country-select.open .country-select-trigger {
  border-color: #d4af37;
  outline: 2px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}

.country-select-trigger img {
  flex-shrink: 0;
  border-radius: 2px;
}

.country-select-placeholder {
  color: #8a929e;
}

.country-select-value {
  display: none;
  align-items: center;
  gap: 8px;
}

.country-select.has-value .country-select-placeholder {
  display: none;
}

.country-select.has-value .country-select-value {
  display: flex;
}

.country-select-arrow {
  margin-right: auto;
  font-size: 10px;
  color: #8a929e;
  transition: transform 0.2s;
}

.country-select.open .country-select-arrow {
  transform: rotate(180deg);
}

.country-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  background: #151b25;
  border: 1px solid #2c3442;
  border-radius: 10px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.country-select.open .country-select-dropdown {
  display: block;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  color: #d8dce3;
  font-size: 15px;
  transition: background 0.15s;
}

.country-option:hover,
.country-option:focus {
  background: rgba(212, 175, 55, 0.15);
}

.country-option img {
  flex-shrink: 0;
  border-radius: 2px;
}

.disclaimer {
  margin-top: 14px;
  font-size: 13px;
  color: #b8bfca;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  padding: 26px 0;
  text-align: center;
  color: #b3bac6;
  background: #090c11;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Hover States (devices with pointer) ────────────────────────────────── */
@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-2px);
    background: #e4c55b;
  }

  .btn-secondary:hover {
    background: rgba(212,175,55,0.12);
  }

  .nav-list li a:hover {
    color: #d4af37;
    background: rgba(212,175,55,0.12);
  }

  .card:hover {
    transform: translateY(-5px);
    border-color: rgba(212,175,55,0.35);
  }

  .testimonial-card:hover {
    border-color: rgba(212,175,55,0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-grid,
  .article-wrap,
  .contact-wrap,
  .cards-3,
  .stats-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .brand-en {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .brand-ar {
    font-size: 15px;
  }

  .hero-image-wrap {
    max-height: 220px;
  }

  .hero-image-wrap img {
    object-fit: cover;
    max-height: 220px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .nav-wrap {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 12px;
    background: rgba(11, 14, 19, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  }

  .nav-wrap.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .nav-list li a {
    display: block;
    padding: 14px 18px;
    border-radius: 12px;
  }

  /* تحويل الزر إلى X عند الفتح */
  .nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero {
    min-height: 88vh;
    min-height: 100dvh;
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-points,
  .form-row {
    grid-template-columns: 1fr;
  }

  .phone-group {
    grid-template-columns: 110px 1fr;
  }

  .section-title h2 {
    font-size: 28px;
  }

  section {
    padding: 50px 0;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .contact .container {
    width: 100%;
    max-width: 100%;
    padding-right: max(8px, env(safe-area-inset-right, 0px));
    padding-left: max(8px, env(safe-area-inset-left, 0px));
  }

  .contact-box,
  .form-box {
    padding: 20px;
  }

  .testimonial-chat {
    min-height: 160px;
  }

  .chat-bubble {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .stat-number {
    font-size: 28px;
  }

  .stat-label {
    font-size: 13px;
  }
}
