/* ═══════════════════════════════════════════
   وکیل فرد — Design System
   Premium Corporate Law · RTL · Dark Navy + Gold
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy-950: #070d18;
  --navy-900: #0c1526;
  --navy-800: #132038;
  --navy-700: #1a2a44;
  --navy-600: #243556;
  --gold-400: #e0c056;
  --gold-500: #c9a227;
  --gold-600: #a8841a;
  --silver: #c8d0dc;
  --white: #f5f7fa;
  --muted: #8b97a8;
  --line: rgba(201, 162, 39, 0.18);
  --glass: rgba(19, 32, 56, 0.72);
  --success: #3d9b6a;
  --danger: #c45c5c;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: 'Vazirmatn', Tahoma, sans-serif;
  --max: 1180px;
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--navy-950);
  color: var(--white);
  line-height: 1.8;
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea, select { font-family: inherit; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ── Circuit pattern bg ── */
.circuit-bg {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(36, 53, 86, 0.55), transparent 70%),
    var(--navy-950);
}
.circuit-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 162, 39, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 39, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  pointer-events: none;
  z-index: 0;
}
.circuit-bg > * { position: relative; z-index: 1; }

/* ── Typography ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-400);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

h1, h2, h3, h4 { line-height: 1.35; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
.lead { color: var(--silver); font-size: 1.05rem; max-width: 38rem; }
.muted { color: var(--muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 8px 28px rgba(201, 162, 39, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 36px rgba(201, 162, 39, 0.4); }
.btn-ghost {
  background: transparent;
  border-color: rgba(200, 208, 220, 0.28);
  color: var(--white);
}
.btn-ghost:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
}
.btn-outline-gold {
  background: transparent;
  border-color: var(--gold-500);
  color: var(--gold-400);
}
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(7, 13, 24, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: 0.72rem; color: var(--muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav > li { position: relative; }
.nav > li > a,
.nav-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--silver);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}
.nav > li > a:hover,
.nav-trigger:hover,
.nav > li > a.active {
  color: var(--gold-400);
  background: rgba(201, 162, 39, 0.08);
}
.nav-trigger svg { width: 12px; height: 12px; opacity: 0.7; transition: transform 0.2s; }
.nav > li:hover .nav-trigger svg { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.25s var(--ease);
  box-shadow: var(--shadow);
  z-index: 50;
}
.nav > li:hover > .mega,
.nav > li:focus-within > .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega.wide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  min-width: 520px;
}
.mega a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--silver);
  transition: 0.2s;
}
.mega a:hover {
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-400);
}
.mega-title {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--gold-500);
  padding: 0.35rem 0.75rem 0.5rem;
  font-weight: 600;
}

.header-cta { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.header-phone {
  display: none;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-400);
  font-weight: 600;
  font-size: 0.9rem;
  direction: ltr;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: 0.25s;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding-top: var(--header-h);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 13, 24, 0.92) 0%, rgba(7, 13, 24, 0.55) 45%, rgba(7, 13, 24, 0.35) 100%),
    url('../images/morteza.jpg') center 20% / cover no-repeat;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--navy-950) 0%, transparent 35%),
    radial-gradient(ellipse 50% 40% at 70% 40%, rgba(201, 162, 39, 0.08), transparent);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 5rem;
  max-width: 640px;
}
.hero-brand {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--white) 30%, var(--gold-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  color: var(--silver);
  margin-bottom: 1rem;
}
.hero .lead { margin-bottom: 2rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--muted);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: float 2.4s ease-in-out infinite;
}
.hero-scroll i {
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--muted);
  border-radius: 12px;
  position: relative;
}
.hero-scroll i::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 7px;
  background: var(--gold-400);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
@keyframes scroll-dot {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 16px; }
}

/* ── Sections ── */
.section { padding: 5.5rem 0; }
.section-head {
  margin-bottom: 2.75rem;
  max-width: 560px;
}
.section-head.center {
  text-align: center;
  margin-inline: auto;
}
.section-alt {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  border-block: 1px solid var(--line);
}

/* ── Service grid ── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.service-item {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(26, 42, 68, 0.5), rgba(12, 21, 38, 0.3));
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
  height: 100%;
}
.service-item:hover {
  border-color: rgba(201, 162, 39, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-400);
  margin-bottom: 1.1rem;
  font-size: 1.35rem;
}
.service-item h3 { margin-bottom: 0.55rem; }
.service-item p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; }
.service-item .link-more {
  color: var(--gold-400);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.service-item .link-more::after { content: '←'; }

/* ── About strip ── */
.about-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  max-height: 520px;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: inherit;
  pointer-events: none;
}
.about-photo-frame {
  position: absolute;
  inset: -12px -12px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  z-index: -1;
}
.creds { display: grid; gap: 0.85rem; margin: 1.5rem 0 2rem; }
.cred {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--silver);
  font-size: 0.95rem;
}
.cred::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}
.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 2px solid var(--gold-500);
  background: rgba(19, 32, 56, 0.4);
}
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-400);
  direction: ltr;
  display: block;
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* ── Process ── */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding-top: 1rem;
}
.process-step::before {
  counter-increment: step;
  content: '۰' counter(step);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(201, 162, 39, 0.2);
  display: block;
  line-height: 1;
  margin-bottom: 0.75rem;
  direction: ltr;
}
.process-step h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.process-step p { color: var(--muted); font-size: 0.9rem; }

/* ── Articles preview ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.article-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
  transition: border-color 0.25s;
}
.article-card:hover { border-color: var(--gold-500); }
.article-tag {
  font-size: 0.75rem;
  color: var(--gold-500);
  font-weight: 600;
  margin-bottom: 0.65rem;
}
.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
  transition: color 0.2s;
}
.article-card:hover h3 { color: var(--gold-400); }
.article-card p { color: var(--muted); font-size: 0.9rem; flex: 1; margin-bottom: 1rem; }
.article-meta { font-size: 0.8rem; color: var(--muted); }

/* ── CTA band ── */
.cta-band {
  padding: 4.5rem 0;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(201, 162, 39, 0.12), transparent),
    var(--navy-800);
  border-block: 1px solid var(--line);
}
.cta-band h2 { margin-bottom: 0.75rem; }
.cta-band p { color: var(--silver); margin-bottom: 1.75rem; max-width: 32rem; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

/* ── FAQ ── */
.faq-list { max-width: 760px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  color: var(--white);
  padding: 1.25rem 0;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q::after {
  content: '+';
  color: var(--gold-400);
  font-size: 1.4rem;
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.35s;
  color: var(--muted);
  font-size: 0.95rem;
}
.faq-item.open .faq-a {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

/* ── Page hero (inner) ── */
.page-hero {
  padding: calc(var(--header-h) + 3.5rem) 0 3rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 80% 20%, rgba(201, 162, 39, 0.08), transparent),
    var(--navy-900);
}
.page-hero .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.page-hero .breadcrumb a:hover { color: var(--gold-400); }
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero .lead { color: var(--muted); }

/* ── Content layout ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}
.content-main { min-width: 0; }
.content-main h2 {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.content-main h2:first-child { margin-top: 0; }
.content-main h3 { margin: 1.75rem 0 0.75rem; color: var(--gold-400); }
.content-main p { color: var(--silver); margin-bottom: 1rem; }
.content-main ul, .content-main ol {
  margin: 0 0 1.25rem 0;
  padding-right: 1.25rem;
  color: var(--silver);
}
.content-main ul { list-style: disc; }
.content-main ol { list-style: persian; }
.content-main li { margin-bottom: 0.45rem; }
.content-main a { color: var(--gold-400); text-decoration: underline; text-underline-offset: 3px; }
.content-main strong { color: var(--white); }

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  display: grid;
  gap: 1rem;
}
.side-box {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy-800);
}
.side-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--gold-400);
}
.side-box a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--silver);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.side-box a:hover { color: var(--gold-400); }
.side-cta {
  background: linear-gradient(160deg, rgba(201, 162, 39, 0.15), rgba(26, 42, 68, 0.6));
  text-align: center;
}
.side-cta p { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }

/* ── Services catalog ── */
.catalog {
  display: grid;
  gap: 1.5rem;
}
.catalog-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(19, 32, 56, 0.4);
}
.catalog-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(201, 162, 39, 0.06);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.catalog-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-400);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.catalog-head h3 { flex: 1; font-size: 1.1rem; }
.catalog-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem;
  padding: 1rem 1.25rem 1.25rem;
}
.catalog-body a {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--silver);
  transition: 0.2s;
}
.catalog-body a:hover {
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-400);
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.contact-info { display: grid; gap: 1.25rem; }
.contact-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 32, 56, 0.4);
}
.contact-item .ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-400);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.contact-item h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.contact-item p, .contact-item a {
  color: var(--silver);
  font-size: 0.95rem;
  direction: ltr;
  display: inline-block;
}
.contact-item a:hover { color: var(--gold-400); }

.form {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--navy-800);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: grid; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--navy-900);
  color: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold-500);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ── Tools / checklist ── */
.check-list {
  display: grid;
  gap: 0.65rem;
}
.check-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(19, 32, 56, 0.35);
  cursor: pointer;
  transition: border-color 0.2s;
}
.check-item:hover { border-color: rgba(201, 162, 39, 0.4); }
.check-item input {
  margin-top: 0.35rem;
  accent-color: var(--gold-500);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.check-item.done {
  opacity: 0.55;
}
.check-item.done span { text-decoration: line-through; }

/* ── Footer ── */
.site-footer {
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 280px; }
.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--gold-400);
}
.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold-400); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Chatbot ── */
.chat-fab {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1100;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 8px 32px rgba(201, 162, 39, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease);
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 0.65rem;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.chat-panel {
  position: fixed;
  bottom: 5.5rem;
  left: 1.5rem;
  z-index: 1100;
  width: min(380px, calc(100vw - 2rem));
  height: min(560px, calc(100vh - 8rem));
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom left;
  transition: 0.3s var(--ease);
}
.chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  border-bottom: 1px solid var(--line);
}
.chat-head img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  object-fit: cover;
}
.chat-head-text { flex: 1; }
.chat-head-text strong { display: block; font-size: 0.95rem; }
.chat-head-text span { font-size: 0.75rem; color: var(--success); }
.chat-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem;
}
.chat-close:hover { color: var(--white); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.msg {
  max-width: 88%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.7;
}
.msg-bot {
  align-self: flex-start;
  background: var(--navy-700);
  color: var(--silver);
  border-bottom-right-radius: 4px;
}
.msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
  border-bottom-left-radius: 4px;
  font-weight: 500;
}
.msg-bot a { color: var(--gold-400); }

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.75rem;
}
.chat-quick button {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--silver);
  font-size: 0.78rem;
  cursor: pointer;
  transition: 0.2s;
}
.chat-quick button:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid var(--line);
  background: var(--navy-900);
}
.chat-input input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--navy-800);
  color: var(--white);
  outline: none;
  font-size: 0.88rem;
}
.chat-input input:focus { border-color: var(--gold-500); }
.chat-input button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--gold-500);
  color: var(--navy-950);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chat-input button:hover { background: var(--gold-400); }

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-gold { color: var(--gold-400); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .service-grid,
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mega.wide { min-width: 320px; grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    bottom: 0;
    background: rgba(7, 13, 24, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.25rem;
    overflow-y: auto;
    transform: translateX(110%);
    transition: transform 0.35s var(--ease);
    z-index: 999;
  }
  .nav.open { transform: translateX(0); }
  .nav > li > a,
  .nav-trigger {
    padding: 0.9rem 1rem;
    font-size: 1rem;
    width: 100%;
    justify-content: space-between;
  }
  .mega, .mega.wide {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    min-width: 0;
    box-shadow: none;
    margin: 0.25rem 0 0.5rem;
    grid-template-columns: 1fr;
  }
  .nav > li.open > .mega { display: grid; }
  .header-cta .btn { display: none; }
  .header-phone { display: flex; }
  .about-strip { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { max-height: 400px; max-width: 360px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(7, 13, 24, 0.55) 0%, rgba(7, 13, 24, 0.92) 70%),
      url('../images/morteza.jpg') center 15% / cover no-repeat;
  }
}

@media (max-width: 600px) {
  .service-grid,
  .article-grid,
  .process,
  .stats,
  .footer-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 3rem 0 4rem; }
  .section { padding: 3.5rem 0; }
  .chat-fab { bottom: 1rem; left: 1rem; width: 54px; height: 54px; }
  .chat-panel { left: 0.75rem; bottom: 4.75rem; }
}
