/* =========================================================
   شرکت‌های ما — طرح هاب + ۶ کادر طلایی (بر اساس mock ارسالی)
   ========================================================= */
@font-face {
  font-family: "IranYekan";
  src: url("../fonts/iranyekanwebregular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IranYekan";
  src: url("../fonts/iranyekanwebbold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --nm-gold: #efa900;
  --nm-navy: #001b4c;
  --nm-navy-2: #063b85;
  --nm-line: #071b54;
  --nm-text: #102a56;
  --nm-muted: #4d6484;
  --header-h: var(--header-height, 70px);
}

html:has(.companies-page),
body:has(.companies-page),
body.nm-hub-body {
  background: transparent !important;
}

body.nm-hub-body {
  font-family: "IranYekan", "YekanBakh", "Vazirmatn", Tahoma, Arial, sans-serif;
  direction: rtl;
  position: relative;
}

.companies-page {
  position: relative;
  width: 100%;
  padding: 0 0 40px;
  overflow: visible;
  color: var(--nm-text);
  z-index: 1;
}

.companies-page .breadcrumb {
  display: none !important;
}

/* ---- سکشن اصلی طرح ---- */
.companies-section {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  min-height: min(860px, calc(100vh - var(--header-h) - 24px));
  margin: 0;
  position: relative;
  overflow: visible;
  background: transparent;
}

/* والپیپر فول‌اسکرین */
.sky-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sky-background img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: saturate(1.06) contrast(1.05) brightness(1.03) blur(4.5px);
  transform: scale(1.04);
}
.sky-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(247, 251, 255, .55) 0%,
      rgba(242, 248, 255, .28) 18%,
      rgba(236, 245, 255, .1) 38%,
      transparent 58%);
}

.city-background {
  display: none;
}

/* ناحیه صندوق‌های دماوند — کادر دقیقاً به اندازه محتوای صندوق‌ها */
.co-main-title {
  position: absolute;
  top: 3.5%;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  max-width: calc(100% - 40px);
  height: auto;
  min-height: 0;
  padding: 8px 12px 10px;
  border: 3px solid rgba(239, 169, 0, .75);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 22px rgba(0, 39, 103, .16);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  overflow: hidden;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.co-main-title.is-lit {
  border-color: var(--nm-gold);
  box-shadow:
    0 0 0 3px rgba(239, 169, 0, .28),
    0 14px 28px rgba(0, 39, 103, .2);
}
.co-main-title:has(.co-fund:hover),
.co-main-title:has(.co-fund.is-open),
.co-main-title:has(.co-fund:focus-within) {
  overflow: visible;
}
.co-funds-head {
  text-align: center;
  flex: 0 0 auto;
}
.co-main-title h1,
.co-main-title #oc-page-title,
.co-funds-title {
  margin: 0;
  font-size: clamp(.95rem, 1.5vw, 1.2rem);
  font-weight: 900;
  color: #001b4c !important;
  line-height: 1.3;
  background: none !important;
  -webkit-text-fill-color: #001b4c !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
}
.co-funds-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 6px 8px;
  min-height: 0;
  overflow: visible;
  padding: 0;
  width: max-content;
  max-width: 100%;
}
.co-fund {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: clamp(62px, 5.2vw, 86px);
  text-decoration: none;
  color: inherit;
  overflow: visible;
  outline: none;
  cursor: pointer;
  z-index: 1;
}
.co-fund.is-open { z-index: 40; }
.co-fund__mark {
  width: clamp(36px, 3.4vw, 48px);
  height: clamp(36px, 3.4vw, 48px);
  border-radius: 0;
  overflow: visible;
  background: none;
  border: 0;
  box-shadow: none;
  display: grid;
  place-items: center;
  transition: transform .22s ease;
}
.co-fund__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(8, 30, 70, .18));
  transition: transform .22s ease, filter .22s ease;
}
.co-fund__name {
  font-size: clamp(9px, .78vw, 11px);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  color: #0d2a58;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity .18s ease, transform .18s ease;
}

/* فضای نمودار — نزدیک‌تر به صندوق‌های دماوند */
.diagram {
  position: absolute;
  top: 24%;
  left: 0;
  width: 100%;
  height: 70%;
  z-index: 2;
}

.connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
/* خط صندوق‌ها→دماوند باید روی کادر بیاید تا به خود لوگو برسد */
.connections--funds {
  z-index: 6;
}

/* دایره مرکزی */
.center-circle {
  position: absolute;
  width: 19%;
  max-width: 250px;
  min-width: 150px;
  aspect-ratio: 1;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(135deg, #fff4bd, #edaa19 42%, #ffdc61 72%, #d58a00);
  padding: 10px;
  box-shadow:
    0 14px 22px rgba(0, 37, 96, .26),
    0 0 0 3px rgba(255, 196, 51, .22);
  z-index: 3;
}
.center-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f7faff);
  border: 2px solid rgba(255, 255, 255, .95);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.center-inner .hub-logo,
.center-inner img {
  width: 72%;
  height: auto;
  max-height: 72%;
  object-fit: contain;
  display: block;
}

/* کارت‌های خدمات — لوگوها در ناحیه سفید + تب آبی */
.service-card {
  position: absolute;
  width: 28.5%;
  height: 24%;
  min-height: 112px;
  border: 4px solid var(--nm-gold);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow:
    0 8px 14px rgba(0, 35, 90, .22),
    0 0 0 1px rgba(255, 220, 120, .25),
    inset 0 0 8px rgba(255, 255, 255, .95);
  z-index: 3;
  cursor: default;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.service-card.has-dense-logos {
  height: 26%;
}
.service-card:has(.card-logo:hover),
.service-card:has(.card-logo.is-open),
.service-card:has(.card-logo:focus-within) {
  overflow: visible;
  z-index: 12;
}
.service-card:hover,
.service-card.is-active {
  transform: translateY(-3px);
  box-shadow:
    0 14px 22px rgba(0, 35, 90, .28),
    0 0 0 1px rgba(255, 220, 120, .35),
    inset 0 0 8px rgba(255, 255, 255, .95);
}

.card-logos {
  position: absolute;
  top: 8%;
  bottom: 8%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 4px 6px;
  padding: 2px 4px;
  box-sizing: border-box;
  z-index: 1;
  overflow: hidden;
}
/* لوگوها چپ کادر — سرمه‌ای راست کادر (هر ۶ کادر یکسان) */
.service-card.right .card-logos,
.service-card.left .card-logos {
  left: 4%;
  right: 40%;
}
.service-card.right .card-logos.is-dense,
.service-card.left .card-logos.is-dense {
  left: 3%;
  right: 38%;
}
.card-logo {
  position: relative;
  width: clamp(64px, 5.8vw, 88px);
  max-width: 48%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
  outline: none;
  z-index: 1;
}
.card-logos.is-mid .card-logo {
  width: clamp(56px, 5vw, 78px);
  max-width: 44%;
}
.card-logos.is-dense {
  top: 6%;
  bottom: 6%;
  gap: 4px 6px;
  padding: 2px 3px;
  align-content: center;
  /* مدیریت دارایی: ۲ ردیف × ۳ لوگو */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  justify-items: center;
  align-items: center;
}
.card-logos.is-dense .card-logo {
  width: 100%;
  max-width: 68px;
  gap: 0;
}
.card-logos.is-dense .card-logo__name {
  display: none;
}
.card-logo:hover,
.card-logo:focus-within,
.card-logo.is-open {
  z-index: 40;
}
.service-card:hover {
  z-index: 8;
}
.card-logo__mark {
  position: relative;
  width: clamp(46px, 4.2vw, 60px);
  height: clamp(46px, 4.2vw, 60px);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 28%, #fff 0%, #f4f7fc 55%, #e4ebf5 100%);
  border: 1px solid rgba(16, 42, 89, .12);
  box-shadow: 0 3px 8px rgba(8, 30, 70, .12);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: box-shadow .22s ease, transform .22s ease;
}
.card-logos.is-mid .card-logo__mark {
  width: clamp(42px, 3.8vw, 54px);
  height: clamp(42px, 3.8vw, 54px);
}
.card-logos.is-dense .card-logo__mark {
  width: clamp(40px, 3.5vw, 52px);
  height: clamp(40px, 3.5vw, 52px);
}
.card-logo__mark img,
.card-logo__mark svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .22s ease;
}
.card-logo__name {
  font-size: clamp(10px, .82vw, 12px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #0d2a58;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity .18s ease, transform .18s ease;
}

/* علامت زیرمجموعه روی سهند / دماوند / راهبر / دی */
.card-logo__badge {
  position: absolute;
  top: -3px;
  inset-inline-start: 50%;
  margin-inline-start: 10px;
  z-index: 4;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd34a, #efa900 55%, #d58a00);
  color: #001b4c;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(8, 30, 70, .28);
  display: grid;
  place-items: center;
  font-size: 8px;
  line-height: 1;
  pointer-events: none;
}
.card-logo.has-subs .card-logo__mark {
  border-color: rgba(239, 169, 0, .55);
  box-shadow:
    0 0 0 2px rgba(239, 169, 0, .22),
    0 3px 8px rgba(8, 30, 70, .12);
}

/* هوور: زوم لوگو + برداشتن کادر دور لوگو + محو اسم کوتاه */
.card-logo.is-open .card-logo__mark,
.card-logo:hover .card-logo__mark,
.co-fund.is-open .co-fund__mark,
.co-fund:hover .co-fund__mark,
.card-sub.is-open .card-sub__mark,
.card-sub:hover .card-sub__mark {
  transform: scale(1.18);
  border-color: transparent;
  background: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.card-logo.is-open .card-logo__mark img,
.card-logo:hover .card-logo__mark img,
.co-fund.is-open .co-fund__mark img,
.co-fund:hover .co-fund__mark img {
  transform: scale(1.04);
  filter: drop-shadow(0 6px 12px rgba(8, 30, 70, .28));
}
.card-logo.is-open.has-subs .card-logo__mark,
.card-logo.has-subs:hover .card-logo__mark {
  border-color: transparent;
  box-shadow: none;
}
.card-logo.is-open .card-logo__name,
.card-logo:hover .card-logo__name,
.co-fund.is-open .co-fund__name,
.co-fund:hover .co-fund__name,
.card-sub.is-open .card-sub__name,
.card-sub:hover .card-sub__name {
  opacity: 0;
  transform: translateY(4px);
}

.nm-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: 50;
  min-width: max-content;
  max-width: 240px;
  padding: 7px 11px;
  border-radius: 10px;
  background: #001b4c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  box-shadow: 0 10px 22px rgba(0, 27, 76, .3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nm-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #001b4c;
}
.card-logo.is-open .nm-tip,
.card-logo:hover .nm-tip,
.co-fund.is-open .nm-tip,
.co-fund:hover .nm-tip,
.card-sub.is-open .nm-tip,
.card-sub:hover .nm-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.card-sub {
  position: relative;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  outline: none;
  z-index: 1;
}
.card-sub.is-open { z-index: 5; }
.card-sub__mark {
  width: 38px;
  height: 38px;
  border-radius: 0;
  overflow: visible;
  background: none;
  border: 0;
  display: grid;
  place-items: center;
  color: #063b85;
  font-size: 12px;
  transition: transform .22s ease;
}
.card-sub__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(8, 30, 70, .16));
}
.card-sub__name {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  color: #123056;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity .18s ease, transform .18s ease;
}

.card-content {
  position: absolute;
  top: 0;
  height: 100%;
  width: 44%;
  background: linear-gradient(145deg, #07408f 0%, #04275f 55%, #001b4c 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  overflow: hidden;
  z-index: 2;
}

/*
  هر ۶ کادر یکسان: سرمه‌ای سمت راست کادر (مثل کادرهای چپ)
  - اوریب به بیرون، قوس فقط گوشه بالای برخورد با کادر
*/
.service-card.right .card-content,
.service-card.left .card-content {
  right: 0;
  left: auto;
  width: 44%;
  border-radius: 0 999px 999px 0;
  clip-path: polygon(
    34% 0%,
    100% 0%,
    100% 100%,
    0% 100%,
    2% 88%,
    7% 65%,
    14% 35%,
    20% 11%,
    22% 6%,
    25% 2.5%,
    29% 0.8%,
    34% 0%
  );
  padding: 8px 16px 8px 14px;
}

.service-icon {
  color: #ffda32;
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: bold;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 205, 0, .25);
  display: grid;
  place-items: center;
}
.service-icon i {
  color: #ffda32;
  font-size: inherit;
}
.service-icon svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
}

.service-text {
  font-size: clamp(12px, 1.3vw, 19px);
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
}

/* موقعیت کارت‌ها — کمی جمع‌تر و نزدیک‌تر به هاب */
.service-card.right { right: 7%; left: auto; }
.service-card.left { left: 7%; right: auto; }
.card-one,
.card-four { top: 0; }
.card-two,
.card-five { top: 30%; }
.card-three,
.card-six { top: 60%; }

.nm-page-desc {
  display: none;
}

/* نوار زیرمجموعه‌های سهند / راهبر / دی — پایین صفحه */
.nm-detail,
.nm-detail[hidden] {
  display: none !important;
}
.hub-subs[hidden] {
  display: none !important;
}
.hub-subs {
  display: grid;
  width: min(1200px, calc(100% - 32px));
  margin: -36px auto 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  position: relative;
  z-index: 4;
}
.hub-subs__group {
  background: rgba(255, 255, 255, .94);
  border: 2px solid rgba(239, 169, 0, .55);
  border-radius: 18px;
  padding: 12px 14px 14px;
  box-shadow: 0 10px 22px rgba(8, 30, 70, .1);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.hub-subs__group.is-lit {
  border-color: var(--nm-gold);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(239, 169, 0, .25),
    0 14px 28px rgba(8, 30, 70, .16);
}
.hub-subs__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.hub-subs__badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd34a, #efa900 55%, #d58a00);
  color: #001b4c;
  display: grid;
  place-items: center;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(8, 30, 70, .2);
  flex: 0 0 auto;
}
.hub-subs__title {
  margin: 0;
  font-size: .9rem;
  font-weight: 900;
  color: #001b4c;
  text-align: center;
  line-height: 1.35;
}
.hub-subs__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}
.hub-subs .card-sub {
  width: 78px;
}
.hub-subs .card-sub__mark {
  width: 42px;
  height: 42px;
}

/* پاپ‌آپ شناور زیرمجموعه‌ها */
.nm-subs-pop {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.nm-subs-pop[hidden] { display: none !important; }
.nm-subs-pop__panel {
  position: fixed;
  width: min(340px, calc(100vw - 24px));
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  border: 2px solid rgba(239, 169, 0, .7);
  box-shadow: 0 18px 36px rgba(0, 35, 90, .28);
  pointer-events: auto;
  animation: nm-subs-in .18s ease;
}
@keyframes nm-subs-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.nm-subs-pop__close {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #001b4c;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.nm-subs-pop__parent {
  margin: 0 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #063b85;
}
.nm-subs-pop__title {
  margin: 0 0 12px;
  text-align: center;
  font-size: .95rem;
  font-weight: 900;
  color: #001b4c;
}
.nm-subs-pop__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}
.nm-subs-pop .card-sub {
  width: 84px;
}
.nm-subs-pop .card-sub__mark {
  width: 44px;
  height: 44px;
}
.nm-subs-pop .card-sub__name {
  font-size: 10px;
  -webkit-line-clamp: 3;
}

/* پنل جزئیات شرکت‌ها */
.nm-detail {
  position: relative;
  z-index: 5;
  width: min(920px, calc(100% - 32px));
  margin: 18px auto 0;
}
.nm-detail[hidden] { display: none !important; }
.nm-detail__panel {
  position: relative;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  border: 3px solid rgba(239, 169, 0, .55);
  box-shadow: 0 14px 30px rgba(0, 35, 90, .14);
}
.nm-detail__close {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--nm-navy);
  color: #fff;
  cursor: pointer;
}
.nm-detail__title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--nm-navy);
}
.nm-detail__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.nm-co {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(16, 42, 89, .08);
  text-decoration: none;
  color: inherit;
}
.nm-co__mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f6fb;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.nm-co__mark img { width: 100%; height: 100%; object-fit: contain; }
.nm-co__name { font-size: .88rem; font-weight: 700; color: var(--nm-navy); }
.nm-detail__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--nm-muted);
  font-weight: 600;
  padding: 12px;
}

/* صندوق‌ها */
.pf-funds {
  position: relative;
  z-index: 4;
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, .86);
  border: 2px solid rgba(239, 169, 0, .4);
  box-shadow: 0 12px 28px rgba(8, 30, 70, .1);
}
.pf-funds[hidden] { display: none !important; }
.pf-funds__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px;
  min-width: 120px;
  background: linear-gradient(180deg, #063b85, #001b4c);
  color: #fff;
  text-align: center;
}
.pf-funds__tab-label {
  margin: 0;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.45;
}
.pf-funds__tab-icon svg { width: 42px; height: 42px; display: block; }
.pf-funds__divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(239, 169, 0, .7), transparent);
}
.pf-funds__body { padding: 14px 16px; min-width: 0; }
.pf-funds__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pf-fund {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(16, 42, 89, .08);
}
.pf-fund__mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f6fb;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.pf-fund__mark img { width: 100%; height: 100%; object-fit: contain; }
.pf-fund__name {
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--nm-navy);
}

.orgchart-image-wrap { text-align: center; margin: 12px 0; }
.orgchart-image { width: 100%; max-width: 1400px; margin: 0 auto; border-radius: 12px; }

/* رزولوشن عریض مثل 2560×1440 */
@media (min-width: 2400px) {
  .center-circle {
    width: 22%;
    max-width: 320px;
    min-width: 200px;
  }
  .center-inner .hub-logo,
  .center-inner img {
    width: 80%;
    max-height: 80%;
  }
  .co-fund {
    width: clamp(88px, 4.6vw, 118px);
  }
  .co-fund__mark {
    width: clamp(52px, 2.8vw, 68px);
    height: clamp(52px, 2.8vw, 68px);
  }
  .co-fund__name {
    font-size: clamp(11px, .5vw, 13px);
  }
  .co-funds-title {
    font-size: clamp(1.05rem, .9vw, 1.35rem);
  }
  .co-main-title {
    padding: 12px 18px 14px;
    gap: 8px;
  }
  .co-funds-row {
    gap: 10px 14px;
  }
  .card-logo {
    width: clamp(78px, 4.4vw, 108px);
  }
  .card-logo__mark {
    width: clamp(58px, 3.4vw, 78px);
    height: clamp(58px, 3.4vw, 78px);
  }
  .card-logo__name {
    font-size: clamp(11px, .55vw, 13px);
  }
  .card-logos.is-mid .card-logo {
    width: clamp(68px, 3.8vw, 94px);
  }
  .card-logos.is-mid .card-logo__mark {
    width: clamp(52px, 3vw, 68px);
    height: clamp(52px, 3vw, 68px);
  }
  .card-logos.is-dense {
    gap: 8px 10px;
  }
  .card-logos.is-dense .card-logo {
    max-width: 92px;
  }
  .card-logos.is-dense .card-logo__mark {
    width: clamp(52px, 3vw, 70px);
    height: clamp(52px, 3vw, 70px);
  }
  .service-card.has-dense-logos {
    height: 28%;
  }
  /* ۳ کادر پایین: لوگو درشت‌تر + نزدیک‌تر به کادرهای بالا */
  .hub-subs {
    margin-top: -72px;
    width: min(1400px, calc(100% - 48px));
    gap: 18px;
  }
  .hub-subs .card-sub {
    width: 104px;
  }
  .hub-subs .card-sub__mark {
    width: 58px;
    height: 58px;
  }
  .hub-subs__title {
    font-size: 1.05rem;
  }
  .diagram {
    height: 68%;
  }
}

/*
  چیدمان عمودی (موبایل / تبلت باریک):
  ۱) لوگوی اصلی  ۲) ۶ کارت  ۳) صندوق‌های دماوند  ۴) ۳ کادر زیرمجموعه
*/
@media (max-width: 1000px) {
  .companies-page {
    display: flex;
    flex-direction: column;
  }
  .companies-section {
    aspect-ratio: auto;
    min-height: 0;
    padding: 16px 10px 8px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .sky-background img {
    object-position: center 60%;
  }
  .connections { display: none; }

  .diagram {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-bottom: 8px;
  }
  .center-circle {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(168px, 42vw);
    max-width: 180px;
    min-width: 120px;
    margin: 0 auto 4px;
    order: -1;
  }
  .service-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: min(520px, 95%);
    height: auto;
    min-height: 108px;
  }
  .service-card.has-dense-logos {
    height: auto;
    min-height: 128px;
  }
  .service-card.right .card-logos,
  .service-card.left .card-logos {
    left: 4%;
    right: 42%;
  }
  .service-card.right .card-content,
  .service-card.left .card-content {
    left: auto;
    right: 0;
    width: 48%;
    border-radius: 0 999px 999px 0;
  }
  .card-logos.is-dense {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .service-text { font-size: 14px; }
  .service-icon { font-size: 26px; }

  /* صندوق‌ها بعد از ۶ کارت */
  .co-main-title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    order: 2;
    width: max-content;
    max-width: calc(100% - 20px);
    margin: 12px auto 10px;
    padding: 10px 12px;
  }
  .co-funds-row {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-width: 100%;
  }

  /* ۳ کادر زیرمجموعه بعد از صندوق‌ها */
  .hub-subs {
    order: 3;
    margin: 8px auto 16px;
    width: calc(100% - 20px);
    max-width: 720px;
    grid-template-columns: 1fr;
  }

  .pf-funds {
    grid-template-columns: 1fr;
  }
  .pf-funds__divider { display: none; }
  .pf-funds__tab { flex-direction: row; min-width: 0; }
  .pf-funds__tab-label br { display: none; }
  .nm-detail__list { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .center-circle {
    width: 140px;
  }
  .service-card {
    min-height: 100px;
  }
  .card-logo {
    width: 64px;
    max-width: 48%;
  }
  .card-logo__mark {
    width: 44px;
    height: 44px;
  }
  .card-logos.is-dense .card-logo {
    max-width: 56px;
  }
  .card-logos.is-dense .card-logo__mark {
    width: 38px;
    height: 38px;
  }
  .co-fund {
    width: 78px;
  }
  .service-text { font-size: 13px; }
}
