/* =========================
   Apar CPA – Main Styles (Fixed & Unified)
   ========================= */

/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}


html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

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

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

/* ---------- Design Tokens ---------- */
:root {
  --primary: #0F2A44;
  --gold: #C9A24D;
  --accent: #E8F1F8;
  --text: #0B1F33;
  --muted: #5B6B7A;

  --bg: #ffffff;
  --bg-soft: #F6F8FB;
  --card: #ffffff;
  --border: rgba(15, 42, 68, 0.12);

  --shadow-sm: 0 6px 20px rgba(11, 31, 51, 0.06);
  --shadow-md: 0 14px 40px rgba(11, 31, 51, 0.10);

  --radius: 18px;
  --radius-lg: 24px;

  --container: 1180px;
}

/* ---------- Vazirmatn Font ----------
   IMPORTANT: مسیر فونت باید درست باشد.
   اگر فونت‌ها داخل /fonts/vazirmatn/ کنار همین CSS نیستند، این مسیر را اصلاح کن.
------------------------------------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Layout ---------- */
.apar-container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.apar-section { padding: 72px 0; }

@media (max-width: 768px) {
  .apar-section { padding: 52px 0; }
}

/* ---------- Global Hover / Transitions ---------- */
a { transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--gold); }

.apar-card,
.apar-btn,
.btn {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* ---------- Buttons ---------- */
.apar-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
}

.btn-primary,
.apar-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.apar-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.apar-btn--ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--primary);
}

.apar-btn--ghost:hover {
  border-color: rgba(15, 42, 68, 0.22);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* =========================
   Header & Navigation (Theme Menu)
========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 18px;
}

.site-brand .brand-link,
.site-brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}

.site-brand img {
  height: 42px;
  width: auto;
}

.site-nav { display: flex; }

.primary-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu li a {
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  color: var(--text);
}

.primary-menu li a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .25s ease;
}

.primary-menu li a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
}

.menu-toggle:hover {
  background: rgba(15, 42, 68, 0.06);
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .site-nav.active { display: block; }

  .primary-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
  }

  .header-cta { display: none; } /* اگر CTA موبایل می‌خوای بعداً اضافه می‌کنیم */
}

/* =========================
   WordPress Block Navigation (If used somewhere)
   Scoped to avoid conflicts with theme menu
========================= */
.wp-block-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wp-block-navigation__container { gap: 20px; }

.wp-block-navigation-item__content {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  position: relative;
}

.wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .25s ease;
}
.wp-block-navigation-item__content:hover::after { width: 100%; }

.wp-block-navigation__responsive-container {
  background: #fff;
  padding: 18px;
}

/* =========================
   Hero
========================= */
.apar-hero {
  padding: 56px 0 64px;
  background: linear-gradient(180deg, #fff, var(--bg-soft));
}

.apar-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 980px) {
  .apar-hero-grid { grid-template-columns: 1fr; }
}

.apar-hero h1 {
  font-size: 40px;
  margin: 0 0 14px;
  line-height: 1.3;
  color: var(--primary);
}

.apar-hero p {
  color: var(--muted);
  max-width: 56ch;
}

/* =========================
   Cards / Grids
========================= */
.apar-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 980px) {
  .apar-grid-3 { grid-template-columns: 1fr; }
}

.apar-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.apar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.apar-card h3 {
  margin: 6px 0 10px;
  font-size: 16px;
  color: var(--primary);
}

.apar-card p {
  font-size: 13px;
  color: var(--muted);
}

/* =========================
   About Page (Shine)
========================= */
.apar-about-text {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  font-size: 15px;
  line-height: 2;
  color: var(--text);
}

.apar-about-text p {
  margin-bottom: 18px;
  color: var(--muted);
}

.apar-person-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--primary);
}

.apar-person-card .footer-muted,
.apar-person-card .card-meta {
  color: #777;
  font-size: 13px;
}

/* =========================
   Contact Page
========================= */
.apar-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .apar-contact-grid { grid-template-columns: 1fr; }
}

.apar-contact-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 14px;
  line-height: 2;
}

.apar-contact-box strong { color: var(--primary); }

.apar-contact-box a {
  color: var(--primary);
  font-weight: 500;
}
.apar-contact-box a:hover { color: var(--gold); }

/* Contact form (future-safe) */
.apar-form input,
.apar-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.apar-form input:focus,
.apar-form textarea:focus {
  border-color: rgba(15, 42, 68, 0.28);
  box-shadow: 0 0 0 4px rgba(15, 42, 68, 0.06);
}

.apar-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* =========================
   Footer (Matches footer.php)
========================= */
.site-footer {
  background: linear-gradient(180deg, #0F2A44, #0B1F33);
  color: #fff;
  padding: 72px 0 28px;
}

.site-footer a:hover { color: var(--gold); }

.footer-container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 48px;
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.footer-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-desc {
  line-height: 1.9;
  opacity: 0.9;
  margin: 10px 0 0;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  margin-bottom: 10px;
  line-height: 1.9;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
/* =========================
   Contact Form – Professional
========================= */

.apar-form-wrapper {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-soft);
  padding: 36px 32px;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.apar-form-wrapper h2 {
  margin-bottom: 8px;
}

.apar-form-wrapper p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* Inputs + Select + Textarea */
.apar-form input,
.apar-form textarea,
.apar-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit; /* ← مشکل فونت select اینجاست */
  font-size: 14px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Focus state */
.apar-form input:focus,
.apar-form textarea:focus,
.apar-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 42, 68, 0.08);
}

/* Labels */
.apar-form label {
  display: block;
  text-align: right;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text);
}

/* Form spacing */
.apar-form > div {
  margin-bottom: 18px;
}

/* Button */
.apar-form button {
  width: 100%;
  margin-top: 10px;
}
