/* ==========================================================================
   refine.css — design refinement layer (loaded last, overrides style.css)
   Tokens, typography, palette cleanup, component polish.
   ========================================================================== */

:root {
  --font-display: "Newsreader", "Cantata One", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --brand: #a8171f;
  --brand-dark: #7d1016;
  --brand-tint: #fbf1f1;
  --ink: #1a1517;
  --ink-2: #4a4245;
  --muted: #6f6669;
  --surface: #faf8f7;
  --surface-2: #f3efee;
  --line: rgba(26, 21, 23, 0.1);
  --line-strong: rgba(26, 21, 23, 0.18);
  --shadow-sm: 0 1px 2px rgba(26, 21, 23, 0.06), 0 2px 8px rgba(26, 21, 23, 0.05);
  --shadow-md: 0 8px 24px rgba(26, 21, 23, 0.1);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  /* legacy variable remap so old rules pick up the new palette */
  --d-main-color: var(--brand);
  --l-main-color: #d9a4a7;
  --sec-color: var(--ink);
}

/* ---------- Base ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

*, *::before, *::after { scrollbar-color: auto; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #cfc7c8; border-radius: 8px; border: 3px solid var(--surface); }
::-webkit-scrollbar-thumb:hover { background: #b5abad; }

::selection { background: var(--brand); color: #fff; }

h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 5000;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Arabic */
body.rtl,
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4,
body.rtl .home h1, body.rtl .home strong,
body.rtl .section-header h2, body.rtl .team-header h2, body.rtl .ex-cl h2,
body.rtl .layout h2, body.rtl .contact-section h2, body.rtl .expertise .card strong {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

/* ---------- Top bar ---------- */
.bnr {
  background: var(--ink);
  padding: 0.45rem 0.75rem;
}
.bnr strong {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Navbar ---------- */
section.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
section.navbar.scrolled { box-shadow: 0 6px 24px rgba(26, 21, 23, 0.07); }
.navbar-inner { padding: 10px 0; }
.logo img { width: 148px; }

.nav-links li a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.005em;
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links li a:hover,
.nav-links li a.active { color: var(--ink); }
.nav-links li a:hover::after,
.nav-links li a.active::after { transform: scaleX(1); }

.nav-links .lang-switch {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}

.navbar-login-btn {
  background: var(--brand);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.15s ease;
}
.navbar-login-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(168, 23, 31, 0.25);
}
.navbar-login-btn:active { transform: translateY(0); }
.navbar-login-btn span { font-weight: 600; letter-spacing: 0.01em; }

.menu-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.home {
  min-height: calc(100dvh - 140px);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.home::before {
  background:
    linear-gradient(180deg, rgba(10, 6, 7, 0.25) 0%, rgba(10, 6, 7, 0) 30%),
    linear-gradient(90deg, rgba(10, 6, 7, 0.72) 0%, rgba(10, 6, 7, 0.35) 55%, rgba(10, 6, 7, 0.1) 100%),
    linear-gradient(0deg, rgba(10, 6, 7, 0.55) 0%, rgba(10, 6, 7, 0) 45%);
}
.home .container { align-items: center; min-height: 0; }
.home .text { padding: 0; gap: 18px; max-width: 700px; }

.home h1,
.home strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.4vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0;
  max-width: 15ch;
  color: #fff;
  min-height: 2.1em;
}
.home h1 .typed-cursor,
.home strong .typed-cursor { font-weight: 300; opacity: 0.7; }

.home .eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 -6px;
}
.home p {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 54ch;
  margin: 0;
}

.home .btn {
  margin-top: 6px;
  background: #fff;
  color: var(--ink);
  text-transform: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.35rem;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.home .btn span { font-size: 1rem; font-weight: 600; letter-spacing: 0.005em; }
.home .btn svg { width: 20px; height: 20px; fill: currentColor; }
.home .btn:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}
.home .btn:hover svg { fill: #fff; transform: translateX(3px); }
.home .btn:active { transform: translateY(0); }
.home .hero-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: -6px;
}

/* ---------- Section headers (shared) ---------- */
.section-header,
.team-header { margin-bottom: 2.6rem; }

.section-header h2,
.team-header h2,
.ex-cl h2,
.contact-section h2,
.testimonials .section-header h2,
.video-library .section-header h2,
.ai-services .section-header h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.75rem;
  text-transform: none;
}
.section-header h2::before,
.team-header h2::before,
.contact-section h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.section-header p,
.team-header p,
.testimonials .section-header p,
.video-library .section-header p,
.ai-services .section-header p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
  max-width: 60ch;
  margin: 0 auto;
}

/* ---------- Team ---------- */
#our-team { background: var(--surface); }
.team-container { gap: 1.25rem; }

.team-member {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 26px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.team-member:hover,
.team-member.active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.team-member h3 { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.team-member p { color: var(--muted); font-size: 0.92rem; }
.team-img { width: 108px; height: 108px; }

.main-member {
  background: #fff;
  color: var(--ink);
  flex-direction: row;
  text-align: left;
  gap: 32px;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 4vw, 3rem);
  transform: none;
  box-shadow: none;
  border: 1px solid var(--line);
  justify-content: flex-start;
}
.main-member:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.main-member .team-img {
  width: 148px;
  height: 148px;
  border: 4px solid var(--surface-2);
  box-shadow: none;
  margin: 0;
  flex-shrink: 0;
}
.main-member .member-text { display: flex; flex-direction: column; gap: 6px; }
.main-member h3,
.main-member p { color: var(--ink); text-shadow: none; }
.main-member h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.main-member p { color: var(--muted); font-size: 0.95rem; }
.main-member .member-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
body.rtl .main-member { text-align: right; }

.show-more,
.show-less {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-weight: 600;
  padding: 11px 20px;
}
.show-more:hover,
.show-less:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: none;
}

/* ---------- Why us (ex-cl) ---------- */
.ex-cl {
  padding-bottom: 0;
  background-image: none;
  background-color: #2b1416;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(168, 23, 31, 0.35), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(255, 255, 255, 0.06), transparent 60%),
    #2b1416;
  text-align: left;
  padding: clamp(4rem, 8vw, 6.5rem) 1rem;
}
.ex-cl::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-size: 160px 160px;
}
.ex-cl .container { width: min(1100px, 100% - 24px); }
.ex-cl .expertise { padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.ex-cl .expertise header {
  max-width: 620px;
  margin-bottom: 2.75rem;
}
.ex-cl h2 {
  color: #fff;
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  margin: 0 0 0.75rem;
}
.ex-cl header h4,
.expertise h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  margin: 0;
}
.expertise .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}
.expertise .card {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 18px;
  align-items: start;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: none;
  backdrop-filter: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.expertise .card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
.expertise .card svg {
  width: 40px;
  height: 40px;
  margin: 2px 0 0;
  fill: #e8b4b7;
  grid-row: 1 / span 2;
}
.expertise .card strong {
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.expertise .card p {
  margin-top: 6px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
}
body.rtl .ex-cl,
body.rtl .expertise .card { text-align: right; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--surface); }
.testimonial-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 26px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial-card .client-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 0 4px;
  border: none;
  background: var(--brand-tint);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.testimonial-card h3 { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0; }
.testimonial-card .stars {
  color: #c99a2e;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin: 0;
}
.testimonial-card .stars i { color: inherit; font-size: inherit; }
.testimonial-card p {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 2px 0 0;
}
body.rtl .testimonial-card { text-align: right; }
.testimonials .swiper-pagination-bullet-active { background: var(--brand); }

/* ---------- Video library ---------- */
.video-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}
.video-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.video-info h3 { color: var(--ink); font-size: 1.05rem; }
.video-info p { color: var(--muted); }
.video-swiper .swiper-button-next,
.video-swiper .swiper-button-prev { color: var(--ink); }
.video-swiper .swiper-pagination-bullet-active { background: var(--brand); }

/* ---------- Practice areas (layout) ---------- */
.layout { background: var(--surface); }
.layout .immigration,
.layout .areas {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
  backdrop-filter: none;
}
.layout .immigration h2,
.layout .areas h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 1.6rem;
}
.layout .immigration h2::after,
.layout .areas h2::after { width: 36px; background: var(--brand); }
.layout .expertise-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.layout .expertise-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 12px 16px;
  text-align: left;
  box-shadow: none;
  min-height: 0;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.layout .expertise-item strong {
  color: var(--ink);
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  padding-right: 18px;
}
.layout .expertise-item::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-50%) rotate(-45deg);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.layout .expertise-item:hover,
.layout .expertise-item.active {
  background: var(--brand-tint);
  border-color: rgba(168, 23, 31, 0.35);
  transform: none;
  box-shadow: none;
}
.layout .expertise-item:hover strong,
.layout .expertise-item.active strong { color: var(--brand); }
.layout .expertise-item:hover::after,
.layout .expertise-item.active::after {
  border-color: var(--brand);
  transform: translateY(-50%) translateX(2px) rotate(-45deg);
}
body.rtl .layout .expertise-item { text-align: right; padding: 12px 16px 12px 14px; }
body.rtl .layout .expertise-item strong { padding-right: 0; padding-left: 18px; text-align: right; }
body.rtl .layout .expertise-item::after {
  right: auto;
  left: 12px;
  transform: translateY(-50%) rotate(135deg);
}

/* ---------- AI services ---------- */
.ai-services { background: #fff; }
.ai-services .section-header p { margin: 10px auto; }
.service-grid { gap: 14px; }
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  text-align: left;
  padding: 26px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: #fff; }
.service-card i {
  font-size: 22px;
  color: var(--brand);
  margin-bottom: 16px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-tint);
}
.service-card h3 { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.service-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
body.rtl .service-card { text-align: right; }

/* ---------- FAQ ---------- */
.faqs { background: var(--surface); }
.faq-item { border-bottom: 1px solid var(--line-strong); margin-bottom: 0; padding: 0; }
.faq-question {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  padding: 20px 4px;
  border-radius: 6px;
}
.faq-question:hover { color: var(--brand); }
.faq-question:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.faq-question i { color: var(--muted); font-size: 0.85rem; }
.faq-answer p { color: var(--ink-2); line-height: 1.7; font-size: 0.98rem; }
.faq-answer a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contact ---------- */
.contact-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.contact-section h2 { color: var(--ink); }
.contact-section > p { color: var(--muted); margin-bottom: 1.8rem; }
label { font-weight: 600; color: var(--ink-2); font-size: 0.88rem; }
input, textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder, textarea::placeholder { color: #a39a9c; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(168, 23, 31, 0.14);
}
.contact-section button {
  background: var(--brand);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.15s ease;
}
.contact-section button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.contact-section button:active { transform: translateY(0); }
.contact-info h3 { color: var(--ink); font-size: 1.05rem; }
.contact-info p { color: var(--ink-2); }
.contact-info a { color: var(--brand); }
.social-links .s {
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.social-links .s:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Locations ---------- */
.location { background: var(--surface); }
.location-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.location-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.location-item p { color: var(--ink-2); line-height: 1.6; }
.location-item i { color: var(--brand); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: #e9e3e4;
  padding: clamp(3rem, 6vw, 4rem) 1rem 2.25rem;
}
.footer-brand { margin-bottom: 1.5rem; }
.footer-logo { height: 40px; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.footer-text small { color: rgba(233, 227, 228, 0.66); font-size: 0.82rem; max-width: 70ch; margin: 6px auto; }
.footer-text p { color: rgba(233, 227, 228, 0.5); font-size: 0.82rem; margin-top: 18px; }

/* ---------- Chat widget ---------- */
#chat-toggle {
  background: var(--brand);
  box-shadow: 0 8px 22px rgba(168, 23, 31, 0.32);
  border: none;
  width: 54px;
  height: 54px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1300;
}
#chat-toggle:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(168, 23, 31, 0.36);
  border: none;
}
#chat-toggle::before { display: none; }
#chat-toggle svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#chat-toggle .ico-close { display: none; }
#chat-toggle.is-open .ico-chat { display: none; }
#chat-toggle.is-open .ico-close { display: block; }

#chat-widget {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(26, 21, 23, 0.22);
  z-index: 1290;
}
#chat-widget .chat-header {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
#chat-widget .chat-header strong { font-weight: 600; }
#chat-widget .icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#chat-widget .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
#chat-widget .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#chat-widget #send-btn { background: var(--brand); color: #fff; border-radius: var(--radius-sm); }
#chat-widget #send-btn:hover { background: var(--brand-dark); }
#chat-widget .panel h3 { color: var(--ink); font-size: 1rem; }
#chat-widget input {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
#chat-widget #setup-form button,
#chat-widget .btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
#chat-widget .messages { background: var(--surface); color: var(--ink); }

/* ---------- Scroll to top ---------- */
.top-bt {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0;
}
.top-bt svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.top-bt:hover { background: var(--brand); }

/* ---------- Popups ---------- */
.popup-content,
.expertise-popup-content {
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
}
.popup-content h3,
.expertise-popup-content h3 { font-family: var(--font-display); font-weight: 500; color: var(--ink); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .expertise .cards { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .home { min-height: calc(100dvh - 130px); }
  .home h1, .home strong { font-size: clamp(2.2rem, 9vw, 3rem); max-width: none; }
  .main-member { flex-direction: column; text-align: center; gap: 18px; }
  body.rtl .main-member { text-align: center; }
  .main-member .team-img { width: 120px; height: 120px; }
  .layout .expertise-items { grid-template-columns: 1fr; }
  .ex-cl { padding: clamp(3rem, 8vw, 4rem) 1rem; }
  .expertise .card { grid-template-columns: 36px 1fr; column-gap: 14px; padding: 1.15rem 1.2rem; }
  .expertise .card svg { width: 32px; height: 32px; }
  .nav-links li a { font-size: 1rem; padding: 10px 4px; }
}
@media (max-width: 480px) {
  .home .btn { width: 100%; justify-content: center; }
  .section-header h2, .team-header h2 { font-size: 1.9rem; }
}

/* ---------- Mobile header (compact single row) ---------- */
@media (max-width: 768px) {
  .navbar-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 8px 0;
  }
  .logo { order: 1; flex: 0 0 auto; }
  .logo img { width: 128px; }
  .nav-actions { order: 2; width: auto; flex: 0 0 auto; margin-left: auto; }
  .navbar-login-btn { width: auto; max-width: none; padding: 8px 14px; font-size: 0.85rem; }
  .nav { order: 3; width: auto; flex: 0 0 auto; position: static; }
  #menu-toggle,
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    background: #fff;
  }
  .menu-toggle span { margin: 0; width: 18px; height: 2px; background: var(--ink); }
  .menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-links {
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    background: var(--ink);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    gap: 0;
  }
  .nav-links li a { padding: 12px 6px; display: block; font-size: 1rem; }
  .nav-links li a::after { display: none; }
  .nav-links .lang-select { padding-top: 8px; }
  .ex-cl .expertise .cards { grid-template-columns: minmax(0, 1fr); }
  .ex-cl .expertise .cards .card { width: auto; max-width: none; min-width: 0; }
}

/* ---------- Motion layer (GSAP / Lenis / Three.js) ---------- */
.motion [data-aos] { opacity: 0; visibility: hidden; }
.motion .home [data-aos] { visibility: visible; }
.motion .home h1 { opacity: 1; }
.home h1 .split-line { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.home h1 .split-word { display: inline-block; will-change: transform; }

.hero-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}
.home .container { position: relative; z-index: 1; }

.section-header h2::before,
.team-header h2::before,
.contact-section h2::before {
  transform: scaleX(var(--rule, 1));
  transform-origin: center;
}

.service-card,
.expertise .card,
.video-card { transform-style: preserve-3d; will-change: transform; }

.contact-note {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: middle;
}
body.rtl .contact-note { margin-left: 0; margin-right: 8px; }
.contact-phone { margin: 6px 0; }
.footer-text small { max-width: 80ch; }

@media (max-width: 768px) {
  .hero-3d { display: none; }
}

/* ---------- Hero actions (consultation + citizenship guide) ---------- */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.hero-actions .btn { margin-top: 0; }
.home .btn.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.home .btn.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.home .btn.btn-ghost .book-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; flex-shrink: 0; }
@media (max-width: 480px) { .hero-actions { flex-direction: column; align-items: stretch; } .hero-actions .btn { width: 100%; justify-content: center; } }
