/* ==========================================================================
   pages/about.css — استایل‌های اختصاصی صفحه‌ی درباره‌ی ما
   لود می‌شود فقط وقتی basename(SCRIPT_NAME) === 'about.php'
   ========================================================================== */

/* ─────────────────────────────────────────────────────────────────────────
   ۱) HERO — بنیان‌گذار
   ───────────────────────────────────────────────────────────────────────── */
.about-hero {
  position: relative;
  min-height: 70vh;
  min-height: 70dvh;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--s-6);
  overflow: hidden;
  background: #111D16;
}
.about-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 50%; height: 100%;
  background-image: url('../../img/honeycomb-luxury.svg');
  background-repeat: repeat;
  background-size: 56px 96px;
  opacity: 0.16;
  pointer-events: none;
  z-index: 2;
  mask-image: radial-gradient(circle at 70% 30%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 80%);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 80%);
}
.about-hero__media { position: absolute; inset: 0; z-index: 0; }
.about-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.about-hero__media .about-hero__fallback { object-fit: contain; padding: var(--s-7); opacity: 0.5; }
.about-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 26, 19, 0.90) 0%, rgba(14, 26, 19, 0.50) 60%, rgba(14, 26, 19, 0.20) 100%);
  z-index: 1;
}
.about-hero__content {
  position: relative;
  z-index: 3;
  color: #fff;
  max-width: 44rem;
  padding-bottom: var(--s-2);
}
.about-hero__title {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-2);
  letter-spacing: var(--shafa-tracking-normal);
}
.about-hero__brand {
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: var(--shafa-tracking-normal);
  opacity: 1;
  text-transform: none;
  direction: rtl;
  text-align: right;
  background: var(--shafa-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.about-hero__thesis {
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  color: #FAF8F5;
}
.about-hero__sub {
  font-size: var(--fs-body);
  line-height: 1.85;
  color: rgba(250, 248, 245, 0.85);
  max-width: 32rem;
  margin-top: var(--s-3);
}

/* ─────────────────────────────────────────────────────────────────────────
    ۲) STATS EDITORIAL — آمار کسب‌وکار
    ───────────────────────────────────────────────────────────────────────── */
.stat-editorial {
  text-align: center;
  padding: var(--s-5) var(--s-4);
  background: var(--shafa-surface-veil);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 20px;
  box-shadow: 0 8px 30px -6px rgba(197, 160, 89, 0.14);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 350ms ease, border-color 350ms ease;
  min-height: 44px;
}
.stat-editorial:hover {
  transform: translateY(-6px);
  border-color: rgba(197, 160, 89, 0.65);
  box-shadow: 0 18px 40px -8px rgba(197, 160, 89, 0.25);
}
.stat-editorial__num {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--shafa-gold-text);
  background: var(--shafa-gold-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: var(--s-1);
  font-variant-numeric: tabular-nums;
}
.stat-editorial__label { font-size: var(--shafa-fs-sm); color: var(--shafa-text-secondary); line-height: 1.6; font-weight: 500; }

/* ─────────────────────────────────────────────────────────────────────────
   ۳) FOUNDER — تصویر بنیان‌گذار + نشان
   ───────────────────────────────────────────────────────────────────────── */
.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-7);
  align-items: center;
}
.founder-image-wrap { position: relative; }
.founder-image-wrap--premium .founder-image {
  border-radius: 22px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  box-shadow: 0 20px 50px -10px rgba(197, 160, 89, 0.25), 0 6px 20px rgba(28, 25, 23, 0.08);
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 500ms ease;
  will-change: transform;
}
.founder-image-wrap--premium:hover .founder-image {
  transform: scale(1.02) translateY(-3px);
  box-shadow: 0 26px 65px -10px rgba(197, 160, 89, 0.35);
}
.founder-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.founder-badge {
  position: absolute;
  bottom: var(--s-3);
  inset-inline-start: var(--s-3);
  background: var(--shafa-surface-veil);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--shafa-text-primary);
  border: 1px solid rgba(197, 160, 89, 0.40);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--shafa-radius-full);
  font-size: var(--shafa-fs-sm);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(197, 160, 89, 0.25);
  max-width: calc(100% - var(--s-4));
}
@media (prefers-reduced-motion: reduce) {
  .founder-image-wrap--premium:hover .founder-image { transform: none; }
  .founder-image-wrap--premium .founder-image { filter: none; }
}

/* ─────────────────────────────────────────────────────────────────────────
   ۴) ROLE CARDS & FAMILY FEATURE
   ───────────────────────────────────────────────────────────────────────── */
.role-card,
.family-feature-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--s-5) var(--s-4);
  background: var(--shafa-surface-veil);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(197, 160, 89, 0.24);
  border-radius: 20px;
  box-shadow: 0 6px 24px -4px rgba(28, 25, 23, 0.05);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms ease, border-color 400ms ease;
  min-height: 44px;
}
.role-card:hover,
.family-feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(197, 160, 89, 0.60);
  box-shadow: 0 20px 45px -8px rgba(197, 160, 89, 0.22);
}
.role-card__icon {
  font-size: 30px;
  color: var(--shafa-gold-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.25);
  margin-bottom: var(--s-3);
  transition: transform 300ms ease, background 300ms ease;
}
.role-card:hover .role-card__icon {
  transform: scale(1.1) rotate(-6deg);
  background: var(--shafa-gold-gradient);
  color: var(--shafa-on-gold);
}
.role-card__title { font-size: var(--fs-small); font-weight: 700; margin: 0; color: var(--shafa-text-primary); }

/* ─────────────────────────────────────────────────────────────────────────
   ۶) TIMELINE — مسیر شکل‌گیری
   ───────────────────────────────────────────────────────────────────────── */
.timeline { position: relative; padding-right: var(--s-6); list-style: none; margin: 0; }
.timeline::before {
  content: '';
  position: absolute;
  right: 15px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--shafa-gold-satin) 0%, var(--shafa-green-alpine) 100%);
  opacity: 0.5;
}
.timeline__item {
  position: relative;
  padding-right: var(--s-5);
  margin-bottom: var(--s-5);
}
.timeline__item:last-child { margin-bottom: 0; }
.timeline__dot {
  position: absolute;
  right: 7px;
  top: 10px;
  width: 18px;
  height: 20px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--shafa-gold-gradient);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.50);
}
.timeline__content {
  background: var(--shafa-surface-veil);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(197, 160, 89, 0.24);
  border-radius: 18px;
  padding: var(--s-5);
  box-shadow: 0 6px 20px -2px rgba(28, 25, 23, 0.04);
  transition:
    border-color 300ms var(--ease),
    box-shadow 300ms var(--ease),
    transform 300ms var(--ease);
}
.timeline__item:hover .timeline__content {
  border-color: rgba(197, 160, 89, 0.55);
  box-shadow: 0 14px 35px -6px rgba(197, 160, 89, 0.18);
  transform: translateX(-4px);
}
.timeline__title { font-size: var(--fs-body); font-weight: 700; margin-bottom: var(--s-1); color: var(--shafa-text-primary); }

/* ─────────────────────────────────────────────────────────────────────────
   ۷) COMMITMENT — خط‌مشی شفافیت (جایگزین بخش ۸)
   ───────────────────────────────────────────────────────────────────────── */
.commitment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s-4);
  max-width: 44rem;
  margin-inline: auto;
}
.commitment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: 3px solid var(--accent);
  border-radius: var(--radius);
}
.commitment__num {
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--shafa-gold-text);
  line-height: 1;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  min-width: 3.5rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.commitment h3 { font-size: var(--fs-h3); margin: 0 0 var(--s-1); }
.commitment p { line-height: 1.8; margin: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   ۸) PHILOSOPHY & VALUES CARDS — فلسفه و ارزش‌ها
   ───────────────────────────────────────────────────────────────────────── */
.philosophy-card,
.value-editorial {
  text-align: center;
  padding: var(--s-4) var(--s-3);
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.philosophy-card__icon,
.value-editorial__icon {
  font-size: 32px;
  color: var(--accent);
  display: block;
  margin-bottom: var(--s-2);
}
.philosophy-card__title,
.value-editorial__title {
  font-size: var(--fs-body);
  font-weight: 500;
  margin-bottom: var(--s-2);
}

/* ─────────────────────────────────────────────────────────────────────────
   ۹) PROCESS — از زنبورستان تا دست شما
   ───────────────────────────────────────────────────────────────────────── */
.process-editorial {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  list-style: none;
  padding: 0;
  margin: 0;
}
.process-editorial__step {
  text-align: center;
  padding: var(--s-5) var(--s-4) var(--s-5);
  /* hex-card provides background, border, shadow via pseudo-elements */
  position: relative;
  transition: transform var(--t-fast) var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* constrain content to hexagon safe zone */
  min-height: 0;
}
.process-editorial__step:hover {
  transform: translateY(-8px);
}
.process-editorial__num {
  position: absolute;
  top: 10px;
  right: 50%;
  transform: translateX(50%);
  width: 32px;
  height: 36px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--shafa-gold-gradient);
  color: var(--shafa-on-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.40);
  transition: transform 300ms ease;
  z-index: 1;
}
.process-editorial__step:hover .process-editorial__num {
  transform: translateX(50%) scale(1.15) rotate(15deg);
  animation: hex-num-pulse 600ms var(--ease) 1;
}
.process-editorial__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  max-width: 80%; /* stay within diagonal edges */
  padding-top: var(--s-3); /* push below number badge */
}
.process-editorial__icon {
  font-size: 32px;
  color: var(--shafa-gold-hover);
  flex-shrink: 0;
  transition: transform 300ms ease;
}
.process-editorial__step:hover .process-editorial__icon {
  transform: scale(1.1) rotate(-6deg);
}
.process-editorial__step h3 { 
  font-size: var(--shafa-fs-body); 
  font-weight: 700; 
  margin-bottom: var(--s-1); 
  color: var(--shafa-text-primary); 
  line-height: 1.4;
}
.process-editorial__step p { 
  font-size: var(--shafa-fs-sm); 
  color: var(--shafa-text-secondary); 
  line-height: 1.6; 
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   ۱۰) TRUST STRIP — نوار افقی شفافیت (عنصر امضا)
   ───────────────────────────────────────────────────────────────────────── */
.trust-strip {
  background: var(--accent-soft-bg);
  border-block: 1px solid var(--accent-soft-border);
  padding: var(--s-4) 0;
}
.trust-strip__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-items: center;
  position: relative;
}
.trust-strip__list::before {
  content: '';
  position: absolute;
  inset: 50% var(--s-5) auto var(--s-5);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-soft-border), transparent);
  z-index: 0;
}
.trust-strip__list > li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.trust-strip__icon { font-size: 20px; color: var(--accent); }

/* ─────────────────────────────────────────────────────────────────────────
   ۱۱) JAR ILLUSTRATION — شیشه‌ی عسل با QR
   ───────────────────────────────────────────────────────────────────────── */
.jar-illustration {
  max-width: 280px;
  margin: 0 auto;
  display: block;
}
.jar-illustration svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .08));
}

/* ─────────────────────────────────────────────────────────────────────────
   ۱۲) QUOTE & FOUNDER NOTE
   ───────────────────────────────────────────────────────────────────────── */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  font-style: italic;
  color: var(--text);
}
.about-founder-note {
  color: var(--text);
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   ۱۳) TABLE OF CONTENTS — فهرست بخش‌ها
   ───────────────────────────────────────────────────────────────────────── */
.about-toc {
  position: sticky;
  top: var(--nav-height);
  z-index: var(--z-nav);
  background: rgba(var(--bg-rgb), .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: var(--s-2) 0;
}
.about-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.about-toc__list::-webkit-scrollbar { display: none; }
.about-toc__list > li { flex: 0 0 auto; }
.about-toc__list a {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  display: inline-block;
}
.about-toc__list a:hover,
.about-toc__list a:focus-visible {
  color: var(--shafa-gold-text);
  background: var(--accent-soft-bg);
}
.about-toc__list a.is-current {
  color: var(--shafa-gold-text);
  background: var(--accent-soft-bg);
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────────
   ۱۴) FOCUS-VISIBLE برای المان‌های about
   ───────────────────────────────────────────────────────────────────────── */
.role-card:focus-visible,
.philosophy-card:focus-visible,
.value-editorial:focus-visible,
.stat-editorial:focus-visible,
.credential-card:focus-visible,
.process-editorial__step:focus-visible,
.family-feature-card:focus-visible,
.commitment:focus-visible {
  outline: 3px solid var(--shafa-gold-text);
  outline-offset: 3px;
}

/* مرجع صادرکننده (متن بلند — مثل وزارت جهاد کشاورزی + معاونت + دفتر) */
.credential-card__authority {
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: keep-all;
  hyphens: auto;
}
.credential-card__authority b { font-weight: 700; }

/* ── کارت مجاز وزارت جهاد کشاورزی — تمایز با سایر مدارک ── */
.credential-card--ministry-license {
  border: 1px solid rgba(197, 160, 89, 0.45);
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.08) 0%, var(--surface) 60%);
  box-shadow: 0 8px 28px -8px rgba(197, 160, 89, 0.18);
}
.credential-card--ministry-license:hover {
  border-color: rgba(197, 160, 89, 0.70);
  box-shadow: 0 14px 36px -8px rgba(197, 160, 89, 0.28);
}
.credential-card__icon-wrapper {
  position: relative;
  display: inline-flex;
}
.credential-card__icon-wrapper .credential-card__icon {
  color: var(--shafa-gold-text);
}
.ministry-badge {
  position: absolute;
  inset-inline-end: -6px;
  bottom: -6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--shafa-gold-gradient);
  color: var(--shafa-on-gold);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.35);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────────
   ۱۶) BACK TO TOP BUTTON
   ───────────────────────────────────────────────────────────────────────── */
  .back-to-top {
    position: fixed;
    bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
    inset-inline-start: var(--s-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--shafa-gold-satin);
  color: var(--shafa-on-gold);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shafa-shadow-lg);
  z-index: var(--shafa-z-toast);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.back-to-top.visible {
  display: flex;
}
.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--shafa-gold-hover);
  box-shadow: var(--shafa-shadow-hover);
}
.back-to-top:active {
  transform: translateY(0) scale(0.95);
}
.back-to-top .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────────────────────
   ۱۷) RESPONSIVE — موبایل
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-editorial { grid-template-columns: repeat(2, 1fr) !important; }
  .process-editorial { grid-template-columns: repeat(2, 1fr) !important; }
  .founder-grid { grid-template-columns: 1fr !important; gap: var(--s-5) !important; }
  .commitment-list { max-width: 100%; }
}
@media (max-width: 768px) {
  .about-hero { min-height: 55vh; min-height: 55dvh; padding-bottom: var(--s-5); aspect-ratio: 4 / 5; }
  .about-hero__content { max-width: 100%; }
  .about-hero__title { gap: var(--s-1); }
  .stats-editorial { grid-template-columns: repeat(2, 1fr) !important; gap: var(--s-3) !important; }
  .process-editorial { grid-template-columns: 1fr !important; gap: var(--s-4) !important; }
  .founder-grid { grid-template-columns: 1fr !important; gap: var(--s-5) !important; }
  .commitment { grid-template-columns: auto 1fr; gap: var(--s-3); padding: var(--s-3); }
  .commitment__num { font-size: 1.6rem; min-width: 2.5rem; }
  .trust-strip__list { grid-template-columns: 1fr; }
  .trust-strip__list::before { display: none; }
  .about-toc { position: static; }
  .about-toc__list { gap: var(--s-2); }
  .about-toc__list a { font-size: var(--fs-caption); }
}
@media (max-width: 600px) {
  .stat-editorial { padding: var(--s-3) var(--s-2); }
  .stat-editorial__num { font-size: 1.5rem; }
}
