:root {
  --primary: #0a2742;
  --primary-2: #194d7a;
  --accent: #d18d27;
  --accent-dark: #b27317;
  --text: #12263b;
  --muted: #617485;
  --bg: #f4f7fa;
  --white: #ffffff;
  --line: #dde6ee;
  --success-bg: #e9f7ef;
  --success-text: #1e7b43;
  --danger-bg: #fdecec;
  --danger-text: #ab2b2b;
  --neutral-bg: #eef2f5;
  --neutral-text: #4f5f70;
  --shadow: 0 20px 50px rgba(12, 34, 54, .08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Inter', Arial, Helvetica, sans-serif; color: var(--text);
  background: var(--white); line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.flex, .topbar-inner, .navbar, .hero-stats, .stats-row, .split, .footer-bottom-inner, .cert-actions, .editor-toolbar, .editor-grid, .mini-actions { display: flex; }
.topbar {
  background: var(--primary); color: rgba(255,255,255,.85); font-size: .92rem;
}
.topbar-inner { justify-content: space-between; gap: 18px; padding: 10px 0; }
.topbar-left, .topbar-right { display:flex; gap:14px; flex-wrap: wrap; align-items: center; }
.topbar .sep { opacity: .35; }
.topbar a:hover { color: #fff; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.98); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(221,230,238,.8); }
.navbar-wrap { position: relative; }
.navbar { justify-content: space-between; align-items: center; padding: 18px 0; gap: 18px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--white); font-weight: 800; letter-spacing: .05em;
}
.brand-text strong { display: block; color: var(--primary); font-size: 1.08rem; }
.brand-text small { display:block; color: var(--muted); }
.main-nav ul { list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:6px; }
.main-nav li { position:relative; }
.main-nav a {
  display:block; padding: 13px 14px; border-radius: 12px; font-weight: 600; color: var(--primary);
}
.main-nav a:hover, .main-nav .active > a { background: #eef4f8; }
.dropdown {
  display: none !important; position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px;
}
.dropdown a { padding: 11px 12px; }
.has-dropdown:hover .dropdown { display: flex !important; flex-direction: column !important; }
.nav-toggle { display:none; background:none; border:0; width:44px; padding:0; }
.nav-toggle span { display:block; height:3px; margin:7px 0; background: var(--primary); border-radius:99px; }
.hero {
  background: linear-gradient(120deg, rgba(10,39,66,.96), rgba(25,77,122,.88)), radial-gradient(circle at top left, rgba(209,141,39,.32), transparent 40%);
  color: var(--white); padding: 92px 0 78px;
}
.hero-inner { display:grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items:center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.06; margin: 0 0 18px; max-width: 12.5ch; }
.hero p { color: rgba(255,255,255,.85); max-width: 760px; font-size: 1.08rem; }
.hero-card {
  background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius: 24px; padding: 30px;
}
.hero-card h3 { margin-top:0; color: var(--white); }
.hero-card p, .hero-card li { color: rgba(255,255,255,.82); }
.eyebrow {
  display:inline-block; margin-bottom: 14px; padding: 8px 12px; border-radius: 999px;
  background: #edf4f9; color: var(--primary-2); font-size:.82rem; font-weight:700; letter-spacing:.06em; text-transform: uppercase;
}
.hero .eyebrow { background: rgba(255,255,255,.14); color: #fff; }
.hero-actions, .mini-actions { display:flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px; padding: 14px 22px;
  border-radius: 14px; font-weight:700; transition: .24s ease; cursor:pointer; border:0; font:inherit;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { border:1px solid rgba(255,255,255,.32); color: var(--white); background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.08); }
.btn-secondary { background:#edf4f8; color: var(--primary); }
.btn-secondary:hover { background:#e2ebf2; }
.section { padding: 76px 0; }
.section-sm { padding: 54px 0; }
.section-alt { background: var(--bg); }
.section-title { max-width: 800px; margin-bottom: 34px; }
.section-title h2, .page-hero h1 { margin:0 0 14px; color: var(--primary); font-size: clamp(1.8rem, 3vw, 3rem); line-height:1.18; }
.section-title p, .lead { color: var(--muted); font-size: 1.04rem; }
.cards-2, .cards-3, .cards-4, .cards-5, .project-grid, .stats-row, .training-grid, .contact-grid, .editor-cards, .records-grid { display:grid; gap:24px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.training-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.editor-cards { grid-template-columns: 1fr 1fr; }
.records-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
.card {
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; height:100%;
}
.card h3, .card h4 { margin-top:0; color: var(--primary); }
.card p:last-child { margin-bottom:0; }
.icon-box {
  width:58px; height:58px; border-radius:16px; display:grid; place-items:center; font-weight:800; color: var(--primary);
  background: linear-gradient(145deg, rgba(25,77,122,.12), rgba(209,141,39,.18)); margin-bottom:18px;
}
.hero-stats { margin-top: 38px; gap: 16px; flex-wrap: wrap; }
.stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); padding: 20px 22px; border-radius: 18px; min-width: 170px; flex:1 1 170px;
}
.stat strong { display:block; font-size:1.8rem; }
.kpi {
  background: var(--white); padding: 24px; border-radius: 18px; border:1px solid var(--line); text-align:center; box-shadow: var(--shadow);
}
.kpi strong { display:block; font-size: 2rem; color: var(--primary); }
.split { gap: 34px; align-items: center; flex-wrap: wrap; }
.split > * { flex: 1 1 360px; }
.panel {
  background: linear-gradient(160deg, #f6fafc, #edf4f8); border:1px solid var(--line); border-radius:24px; padding:34px;
}
.checklist, .bullet-list, .contact-list, .mini-list, .editor-list { list-style:none; padding:0; margin:18px 0 0; }
.checklist li, .bullet-list li, .contact-list li, .mini-list li, .editor-list li {
  position:relative; padding-left:26px; margin-bottom:12px;
}
.checklist li::before, .bullet-list li::before, .contact-list li::before, .mini-list li::before, .editor-list li::before {
  content:'•'; position:absolute; left:8px; color: var(--accent); font-weight:900;
}
.page-hero {
  padding: 66px 0 44px; background: linear-gradient(180deg, #f6f9fc 0%, #ffffff 100%); border-bottom: 1px solid var(--line);
}
.breadcrumbs { color: var(--muted); font-size:.95rem; margin-bottom:10px; }
.notice {
  padding: 18px 20px; border-left:4px solid var(--accent); background:#fff8ed; border-radius:14px; color:#6a4a18;
}
.banner-cta {
  padding: 36px; border-radius: 24px; color: var(--white); background: linear-gradient(120deg, var(--primary), var(--primary-2));
}
.banner-cta h3 { margin-top:0; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse: collapse; background: var(--white); }
th, td { padding: 16px 18px; border-bottom:1px solid var(--line); text-align:left; vertical-align: top; }
th { color: var(--primary); background:#f8fbfd; }
form { display:grid; gap:16px; }
input, select, textarea {
  width:100%; padding: 14px 16px; border:1px solid #cdd8e2; border-radius:14px; font:inherit; background: var(--white); color: var(--text);
}
textarea { min-height: 160px; resize: vertical; }
.label { font-weight: 600; color: var(--primary); margin-bottom:8px; display:block; }
.map-placeholder {
  min-height: 320px; border-radius: 22px; border:1px solid var(--line);
  background: linear-gradient(135deg, rgba(25,77,122,.08), rgba(209,141,39,.08)), repeating-linear-gradient(45deg, #f5f8fa, #f5f8fa 10px, #edf2f6 10px, #edf2f6 20px);
  display:grid; place-items:center; text-align:center; padding:24px;
}
.accordion-item { border:1px solid var(--line); border-radius: 16px; margin-bottom: 14px; overflow: hidden; background: var(--white); }
.accordion-btn {
  width:100%; border:0; background: var(--white); padding: 18px 20px; font:inherit; font-weight:700; color: var(--primary); text-align:left; cursor:pointer;
}
.accordion-content { display:none; padding: 0 20px 20px; color: var(--muted); }
.badge {
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; font-weight:700; font-size:.86rem;
}
.badge.active { background: var(--success-bg); color: var(--success-text); }
.badge.expired { background: var(--danger-bg); color: var(--danger-text); }
.badge.inactive { background: var(--neutral-bg); color: var(--neutral-text); }
.search-panel {
  background: var(--white); border:1px solid var(--line); box-shadow: var(--shadow); border-radius: 24px; padding: 28px;
}
.cert-result-card {
  border:1px solid var(--line); border-radius: 18px; padding: 22px; background:#fbfdff; margin-bottom: 16px;
}
.cert-meta {
  display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px 20px; margin-top: 16px;
}
.cert-meta div { padding: 12px 14px; background: #fff; border:1px solid var(--line); border-radius: 14px; }
.cert-meta strong { display:block; color: var(--primary); font-size:.9rem; margin-bottom:4px; }
.result-empty {
  padding: 22px; border-radius: 18px; background:#f8fbfd; border:1px dashed #c7d5e3; color: var(--muted);
}
.site-footer { background:#0b2137; color: rgba(255,255,255,.86); }
.footer-grid { display:grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 28px; padding: 64px 0 34px; }
.site-footer h3, .site-footer h4 { color:#fff; margin-top:0; }
.site-footer ul { list-style:none; padding:0; margin:0; }
.site-footer li { margin-bottom:12px; }
.site-footer a { color: rgba(255,255,255,.86); }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.08); }
.footer-bottom-inner { justify-content: space-between; align-items:center; padding: 18px 0; color: rgba(255,255,255,.62); gap:14px; }
.reveal { opacity:0; transform: translateY(24px); transition:.6s ease; }
.reveal.visible { opacity:1; transform:none; }
.small { font-size:.92rem; color: var(--muted); }
.highlight-box {
  border:1px solid var(--line); border-radius:20px; padding: 22px; background: linear-gradient(180deg, #fff, #f8fbfd);
}
.search-input-wrap { display:flex; gap:12px; flex-wrap: wrap; }
.search-input-wrap input { flex: 1 1 320px; }
.editor-toolbar { gap: 12px; flex-wrap: wrap; margin-bottom: 18px; align-items:center; }
.editor-shell {
  background: var(--white); border:1px solid var(--line); border-radius: 24px; overflow:hidden; box-shadow: var(--shadow);
}
.editor-grid { align-items: stretch; gap: 0; }
.editor-sidebar {
  flex: 0 0 340px; border-right:1px solid var(--line); padding: 24px; background:#f8fbfd;
}
.editor-preview { flex: 1 1 auto; min-height: 760px; background: #dfe8ef; }
.editor-preview iframe { width:100%; min-height: 760px; border:0; background:#fff; }
.editor-note {
  font-size:.92rem; color: var(--muted); background:#fff; border:1px solid var(--line); border-radius: 16px; padding: 16px;
}
.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background:#0f1f31; color:#eaf2f7; border-radius: 16px; padding:18px; overflow:auto;
}
.records-table input { min-width: 120px; }
.records-table td { min-width: 140px; }
.records-table .compact { min-width: 95px; }
.editor-cta {
  border:1px dashed #c6d5e3; border-radius: 18px; padding: 18px; background:#fff;
}
.inline-links { display:flex; gap:14px; flex-wrap: wrap; margin-top: 12px; }
.inline-links a { color: var(--primary-2); text-decoration: underline; }
@media (max-width: 1180px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-grid, .training-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .nav-toggle { display:block; }
  .main-nav {
    position:absolute; left:16px; right:16px; top: calc(100% + 10px); background: var(--white); border:1px solid var(--line);
    border-radius:18px; box-shadow: var(--shadow); padding:14px; display:none;
  }
  .main-nav.open { display:block; }
  .main-nav ul, .dropdown { flex-direction:column !important; align-items: stretch; }
  .dropdown { display:flex !important; position: static; box-shadow:none; border:0; padding: 0 0 0 10px; min-width:100%; }
  .main-nav a { padding:12px 10px; }
  .cards-3, .cards-4, .cards-5, .project-grid, .training-grid, .contact-grid, .editor-cards, .records-grid { grid-template-columns: 1fr; }
  .editor-grid { flex-direction: column; }
  .editor-sidebar { border-right:0; border-bottom:1px solid var(--line); flex-basis: auto; }
}
@media (max-width: 760px) {
  .topbar-inner, .footer-bottom-inner { flex-direction: column; align-items:flex-start; }
  .hero { padding: 66px 0 56px; }
  .section { padding: 58px 0; }
  .cards-2, .cards-4, .cards-5, .cert-meta { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}


body { font-family: 'Inter', 'Vazirmatn', Arial, Helvetica, sans-serif; }
.brand-logo { width: 248px; max-width: 100%; height: auto; display:block; }
.footer-logo { width: 250px; max-width: 100%; height: auto; margin-bottom: 16px; }
.lang-switcher { display:flex; gap:8px; align-items:center; }
.lang-link { display:inline-flex; align-items:center; justify-content:center; min-width:54px; padding:8px 12px; border-radius:999px; border:1px solid rgba(255,255,255,.18); color:#fff; background: rgba(255,255,255,.10); font-weight:700; font-size:.85rem; }
.lang-link:hover, .lang-link.active { background:#fff; color: var(--primary); }
html[dir="rtl"] body { direction: rtl; text-align: right; font-family: 'Vazirmatn', 'Inter', Arial, Helvetica, sans-serif; }
html[dir="rtl"] .topbar-inner, html[dir="rtl"] .footer-bottom-inner { flex-direction: row-reverse; }
html[dir="rtl"] .topbar-left, html[dir="rtl"] .topbar-right, html[dir="rtl"] .hero-actions, html[dir="rtl"] .mini-actions, html[dir="rtl"] .search-input-wrap { flex-direction: row-reverse; }
html[dir="rtl"] .main-nav ul { flex-direction: row-reverse; }
html[dir="rtl"] .dropdown { left: auto; right: 0; }
html[dir="rtl"] .checklist li, html[dir="rtl"] .bullet-list li, html[dir="rtl"] .contact-list li, html[dir="rtl"] .mini-list li, html[dir="rtl"] .editor-list li { padding-left: 0; padding-right: 26px; }
html[dir="rtl"] .checklist li::before, html[dir="rtl"] .bullet-list li::before, html[dir="rtl"] .contact-list li::before, html[dir="rtl"] .mini-list li::before, html[dir="rtl"] .editor-list li::before { left: auto; right: 8px; }
html[dir="rtl"] th, html[dir="rtl"] td, html[dir="rtl"] .accordion-btn, html[dir="rtl"] .cert-meta div { text-align: right; }
@media (max-width: 980px) { .brand-logo { width: 212px; } }
@media (max-width: 760px) { .footer-logo { width: 220px; } }

.verified-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.verified-tick {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 18px;
}

.verification-brandline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 14px;
}

.verification-brand-logo {
  width: 120px;
  max-width: 100%;
  height: auto;
  display: block;
}

.verification-brandline span {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 640px) {
  .verification-brandline {
    flex-wrap: wrap;
    gap: 8px;
  }

  .verification-brand-logo {
    width: 100px;
  }
}

.contact-map-wrap {
  margin-top: 16px;
}

#office-map {
  height: 360px;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.map-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

@media (max-width: 640px) {
  #office-map {
    height: 300px;
  }
}
