/* ===================================================================
   مكتب المحامي محمد بن يحيى القحطاني — نظام التصميم
   =================================================================== */

@font-face {
  font-family: 'Noor';
  src: url('../fonts/Noor-Light.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Noor';
  src: url('../fonts/Noor-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Noor';
  src: url('../fonts/Noor-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #4A3728;
  --navy-deep: #362718;
  --gold: #9E7E57;
  --gold-light: #c7ab84;
  --cream: #F4EFE6;
  --ink: #20262B;
  --white: #FFFFFF;
  --line: rgba(32, 38, 43, 0.12);

  --font-display: 'Noor', 'Tajawal', sans-serif;
  --font-body: 'Tajawal', 'Noor', sans-serif;

  --container: 1180px;
  --radius: 4px;
  --shadow: 0 20px 50px -25px rgba(32, 38, 43, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.2em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .25s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.4);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-light {
  background: #FFFFFF;
  color: var(--navy);
  border-color: var(--gold);
}
.btn-light:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* ============ الشارة/الختم — العنصر البصري المميز ============ */
.seal {
  --seal-size: 64px;
  width: var(--seal-size);
  height: var(--seal-size);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.seal svg { width: 100%; height: 100%; }

/* ============ الهيدر ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 239, 230, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo-link { display: flex; align-items: center; gap: 12px; }
.logo-link img { height: 118px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-weight: 700;
  font-size: .96rem;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  right: 0; left: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--gold); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn { padding: 12px 24px; font-size: .88rem; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); display: block; }

/* ============ الهيرو ============ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(158,126,87,.18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(158,126,87,.12), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 40px;
  padding-top: 88px;
  position: relative;
}
.hero-copy .eyebrow { color: var(--gold-light); }
.hero-copy .eyebrow::before { background: var(--gold-light); }
.hero h1 { color: var(--white); }
.hero-copy p.lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,.82);
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

.hero-trust {
  display: flex;
  gap: 44px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.15);
  flex-wrap: wrap;
  align-items: flex-start;
}
.hero-trust div {
  text-align: center;
  min-width: 130px;
  max-width: 170px;
}
.hero-trust div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}
.hero-trust div span { font-size: .85rem; color: rgba(255,255,255,.7); line-height: 1.5; }

.hero-figure {
  position: relative;
  align-self: end;
  justify-self: center;
  padding-top: 40px;
}
.hero-figure .shield-bg {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: 128%;
  aspect-ratio: 400 / 460;
  z-index: 0;
}
.hero-figure .shield-bg svg { width: 100%; height: 100%; display: block; }
.hero-figure img {
  position: relative;
  z-index: 1;
  max-height: 480px;
  width: auto;
  margin: 0 auto;
  display: block;
}

/* ============ الأقسام العامة ============ */
section { padding: 88px 0; }
.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2 { color: var(--white); }
.bg-white { background: var(--white); }

/* ============ لماذا تختارنا ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px;
  position: relative;
}
.why-card .seal { color: var(--gold); margin-bottom: 22px; }
.why-card h3 { margin-bottom: 10px; }
.why-card p { color: rgba(32,38,43,.75); margin: 0 0 10px; }
.why-card p:last-child { margin-bottom: 0; }

/* ============ الخدمات ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service-card {
  display: flex;
  gap: 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.service-card .seal { color: var(--navy); width: 52px; height: 52px; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: rgba(32,38,43,.75); margin: 0 0 10px; }
.service-card p:last-child { margin-bottom: 0; }

/* ============ آلية العمل ============ */
.process-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.process-step { position: relative; padding-inline-start: 4px; }
.process-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.bg-navy .process-num { color: var(--gold-light); border-color: var(--gold-light); }
.process-step h3 { margin-bottom: 8px; }
.bg-navy .process-step h3 { color: var(--white); }
.bg-navy .process-step p { color: rgba(255,255,255,.72); }

/* ============ نطاق الدعوة للإجراء ============ */
.cta-band {
  background: var(--gold);
  color: var(--white);
  border-radius: var(--radius);
  padding: 52px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); }

/* ============ صفحة من نحن ============ */
.about-hero {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-hero-figure {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 420px;
}
.about-hero-figure .shield-frame {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 92%;
  z-index: 0;
}
.about-hero-figure .shield-frame svg { width: 100%; height: 100%; }
.about-hero-figure img {
  position: relative;
  z-index: 1;
  max-height: 420px;
  width: auto;
  max-width: 88%;
  object-fit: contain;
  margin: 0 auto;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.pillar {
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 3px solid var(--gold);
}
.pillar h3 { font-size: 1.05rem; }
.pillar p { color: rgba(32,38,43,.75); margin: 0; }

.bio-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px;
  border: 1px solid var(--line);
}
.bio-block .bio-heading {
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 18px;
}
.bio-block p { color: rgba(32,38,43,.82); }

/* ============ صفحة اتصل بنا ============ */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 48px;
  align-items: start;
}
.contact-info-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px;
}
.contact-info-card h3 { color: var(--white); }
.info-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.info-row:last-child { border-bottom: none; }
.info-row .seal { width: 26px; height: 26px; color: var(--gold-light); margin-top: 3px; }
.info-row strong { display: block; font-size: .82rem; color: rgba(255,255,255,.55); font-weight: 400; margin-bottom: 3px; }
.info-row span, .info-row a { font-weight: 700; }

.social-row { display: flex; gap: 12px; margin-top: 28px; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.social-row a:hover { background: var(--gold); border-color: var(--gold); }
.social-row svg { width: 18px; height: 18px; }

.confidential-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(158,126,87,.08);
  border: 1px solid rgba(158,126,87,.35);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: .92rem;
  color: var(--navy);
  margin-top: 24px;
}
.confidential-note .seal { width: 22px; height: 22px; margin-top: 2px; color: var(--gold); }

.booking-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: .88rem;
  margin-bottom: 8px;
  color: var(--navy);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .96rem;
  background: var(--cream);
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  background: var(--white);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: .82rem; color: rgba(32,38,43,.6); margin-top: 4px; }
.form-alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 700;
}
.form-alert.success { background: #e5f3e9; color: #1f6b3b; border: 1px solid #b7ddc3; }
.form-alert.error { background: #fbeaea; color: #a33; border: 1px solid #f0c3c3; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 44px;
  border: 1px solid var(--line);
}
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ============ زر واتساب العائم ============ */
.wa-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -10px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ============ الفوتر ============ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-about img { height: 44px; margin-bottom: 18px; filter: brightness(0) invert(1); }
.footer-about p { color: rgba(255,255,255,.55); font-size: .92rem; max-width: 32ch; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(255,255,255,.65); font-size: .92rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 10px; margin-top: 6px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 16px; height: 16px; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); }
.footer-bottom {
  padding: 22px 0;
  text-align: center;
  font-size: .85rem;
  color: rgba(255,255,255,.4);
}

/* ============ استجابة الجوال ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 32px; gap: 8px; }
  .hero-figure {
    order: -1;
    padding-top: 0;
    margin-bottom: 20px;
  }
  .hero-figure img { max-height: 300px; }
  .why-grid, .services-grid, .process-track, .pillars { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  .about-hero-figure { max-width: 320px; margin: 0 auto; min-height: 320px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-grid-2 { grid-template-columns: 1fr; }

  .header-inner { padding-top: 10px; padding-bottom: 10px; position: relative; min-height: 66px; }
  .logo-link {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .logo-link img { height: 52px; }
  .main-nav { display: none; }
  .header-cta {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
  .header-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--line);
    gap: 18px;
    z-index: 50;
  }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 28px; }
}

@media (max-width: 600px) {
  section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
  .bio-block, .booking-form, .contact-info-card { padding: 26px; }
  .logo-link img { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* وصول لوحة المفاتيح */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
