/* ============================================= */
/* چارت سازمانی و اشعار                        */
/* ============================================= */
.org-chart-part {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.poems {
  margin: 2vh;
  padding: 3vh;
  margin-top: 5vh;
  text-align: center;
  line-height: 2;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 2vh;
  width: 37rem;
  background: linear-gradient(145deg, #fbcaff 0%, #f5e0ff 100%);
  border: #985fad solid 2px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(88, 50, 102, 0.1);
  direction: rtl;
}
.verse-1,
.verse-2 {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}
.verse-2 {
  padding-top: 15px;
}
.poet {
  padding-top: 2vh;
  text-align: left;
  font-size: 1.3vh;
  margin-left: 4vh;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.chart-part {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  padding: 5vh 0;
}

/* ============================================= */
/* رده‌بندی‌ها (موسسین، کارکنان، دبیران)        */
/* ============================================= */
.teachers-ranks,
.deputy-ranks,
.high-ranks {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  width: fit-content;
  margin: 30px;
  width: 95%;
}
.teachers-title,
.deputy-title,
.high-title {
  border-top: #77187e solid 3px;
  border-top-right-radius: 30px;
  border-top-left-radius: 30px;
  text-align: center;
  color: #000;
  font-family: "Noto Nastaliq Urdu", serif;
  font-size: 30px;
  width: 100%;
  text-shadow: 2px 2px 4px rgb(0, 0, 0, 0.3);
  padding: 2vh 0;
}

/* ============================================= */
/* کارت‌های پرسنل                              */
/* ============================================= */
.teacher-base,
.deputy-base,
.high-base {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 16px;
  box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
  width: 18vw;
  padding: 3vh;
  margin: 2vh;
  max-height: 30vh;
}
.high-base {
  border: #9faa00 solid 3px;
  background-color: #faffb3;
}
.deputy-base {
  border: #34a300 solid 3px;
  background-color: #c5ffab;
}
.teacher-base {
  border: #0099b8 solid 3px;
  background-color: #c4f5ff;
}
.high-part,
.teachers-part,
.deputy-part {
  display: flex;
  justify-content: space-evenly;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: space-between;
  align-items: center;
  width: 100%;
}

/* ============================================= */
/* اطلاعات و تصویر پرسنل                      */
/* ============================================= */
.teacher-name,
.deputy-name,
.high-name {
  padding-top: 2vh;
  text-align: center;
  font-family: "Vazirmatn", sans-serif;
  font-weight: 700;
  font-size: 1.7vh;
  text-shadow: 0 0 8px #9b9b9b;
}
.teacher-lesson {
  padding-top: 1vh;
  text-align: center;
  font-family: "Vazirmatn", sans-serif;
  font-weight: 500;
  font-size: 1.5vh;
}
.deputy-rank,
.high-rank {
  padding-top: 1vh;
  text-align: center;
  font-family: "Vazirmatn", sans-serif;
  font-weight: 500;
  font-size: 1.5vh;
}
.teacher-info,
.deputy-info,
.high-info {
  width: max-content;
  display: flex;
  text-align: center;
  flex-direction: column;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.teacher-picture,
.deputy-picture,
.high-picture {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-content: center;
}
.teacher-img,
.deputy-img,
.high-img {
  border-radius: 100%;
  height: 17.5vh;
}

/* ============================================= */
/* ریسپانسیو صفحه پرسنل                       */
/* ============================================= */
@media only screen and (max-width: 980px) {
  .teacher-base,
  .deputy-base,
  .high-base {
    width: 55vw;
  }
  .teachers-ranks,
  .deputy-ranks,
  .high-ranks {
    width: fit-content;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .high-part,
  .teachers-part,
  .deputy-part {
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .verse-1,
  .verse-2 {
    flex-direction: column;
    margin: 1vh 0;
  }
  .poems {
    width: 17rem;
  }
}.personnel-icon-fallback{display:grid;place-items:center;width:100%;height:100%;min-height:90px;background:rgba(119,24,126,.08);color:#77187e;font-size:2.2rem;border-radius:inherit}

/* آموزشگاه کنکور: بخش مستقل و محترمانه، بدون تداخل با دبیران دبیرستان */
.konkur-ranks {
  width: min(1180px, 94%);
  margin: clamp(32px, 5vw, 72px) auto 10px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(119, 24, 126, .18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 12%, rgba(251, 202, 255, .6), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fff7ff 100%);
  box-shadow: 0 18px 50px rgba(92, 18, 101, .10);
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.konkur-head {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}
.konkur-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid #e9c7ee;
  border-radius: 999px;
  background: #fff;
  color: #77187e;
  font-size: .82rem;
  font-weight: 850;
}
.konkur-head h2 {
  margin: 12px 0 7px;
  color: #4f0f55;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 950;
  line-height: 1.55;
}
.konkur-head p {
  margin: 0;
  color: #705d75;
  font-size: .95rem;
  line-height: 2;
}
.konkur-part {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.konkur-base {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #eadbed;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px rgba(78, 16, 88, .07);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.konkur-base:hover {
  transform: translateY(-4px);
  border-color: #d69add;
  box-shadow: 0 18px 42px rgba(78, 16, 88, .12);
}
.konkur-picture {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  overflow: hidden;
  background: #fbf0fc;
  display: grid;
  place-items: center;
}
.konkur-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.konkur-info { min-width: 0; text-align: right; }
.konkur-name {
  display: block;
  color: #35133b;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.8;
}
.konkur-title {
  display: inline-flex;
  margin-top: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f7e6fa;
  color: #77187e;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.7;
}
.konkur-desc {
  margin: 10px 0 0;
  color: #68536d;
  font-size: .84rem;
  line-height: 2;
  overflow-wrap: anywhere;
}
@media only screen and (max-width: 620px) {
  .konkur-ranks { width: calc(100% - 18px); padding: 17px 12px; border-radius: 22px; }
  .konkur-base { grid-template-columns: 72px minmax(0, 1fr); padding: 13px; border-radius: 18px; }
  .konkur-picture { width: 72px; height: 72px; border-radius: 19px; }
}

/* ==================== FINAL PERSONNEL SPLIT + KONKUR THEME ==================== */
.personnel-mode {
  width: min(1180px, 94%);
  margin: clamp(18px, 4vw, 44px) auto clamp(24px, 4vw, 42px);
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(119,24,126,.18);
  border-radius: 26px;
  background: linear-gradient(135deg,#fff 0%,#fff7ff 100%);
  box-shadow: 0 16px 42px rgba(75, 18, 82, .08);
  text-align: center;
  box-sizing: border-box;
}
.personnel-mode-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f7e6fa;
  color: #77187e;
  font-weight: 900;
  font-size: .82rem;
}
.personnel-mode h2 {
  margin: 12px 0 6px;
  color: #4f0f55;
  font-size: clamp(1.25rem, 3vw, 1.95rem);
  font-weight: 950;
  line-height: 1.6;
}
.personnel-mode p {
  max-width: 820px;
  margin: 0 auto 18px;
  color: #6f6074;
  line-height: 2;
  font-size: .94rem;
}
.personnel-mode-actions {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  padding: 7px;
  border-radius: 18px;
  background: #f7eff8;
  border: 1px solid #eadbed;
}
.personnel-mode-btn {
  border: 0;
  border-radius: 14px;
  min-height: 50px;
  padding: 10px 18px;
  background: #fff;
  color: #4f3556;
  font: 900 .94rem Vazirmatn, Tahoma, sans-serif;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.personnel-mode-btn i { margin-left: 7px; }
.personnel-mode-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(77, 18, 88, .1); }
.personnel-mode-btn.is-active {
  background: linear-gradient(135deg,#77187e,#a64eb0);
  color: #fff;
  box-shadow: 0 12px 28px rgba(119,24,126,.22);
}
.personnel-view[hidden] { display: none !important; }
.personnel-view { width: 100%; animation: personnelFade .22s ease both; }
@keyframes personnelFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.konkur-ranks {
  width: min(1180px, 94%) !important;
  margin: clamp(20px, 4vw, 48px) auto 12px !important;
  padding: clamp(22px, 4vw, 42px) !important;
}
.konkur-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f7e6fa;
  color: #68136f;
  font-weight: 950;
  font-size: .88rem;
}
.konkur-founders { margin-bottom: clamp(22px, 4vw, 36px); }
.konkur-founder-part,
.konkur-part {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 18px !important;
}
.konkur-base,
.konkur-founder-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 100% !important;
  padding: 20px 16px !important;
  text-align: center !important;
  border: 1px solid #eadbed !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 12px 32px rgba(78,16,88,.075) !important;
}
.konkur-founder-card {
  background: linear-gradient(180deg,#fff 0%,#fff6ff 100%) !important;
  border-color: #e4c5e9 !important;
}
.konkur-picture,
.konkur-founder-picture {
  width: 118px !important;
  height: 118px !important;
  border-radius: 50% !important;
  border: 4px solid #f6d8fa !important;
  box-shadow: 0 12px 28px rgba(119,24,126,.14) !important;
  margin: 0 auto 2px !important;
}
.konkur-img,
.konkur-icon-fallback { border-radius: 50% !important; }
.konkur-info { text-align: center !important; }
.konkur-name {
  display: block !important;
  color: #321238 !important;
  font-size: 1.03rem !important;
  font-weight: 950 !important;
  line-height: 1.8 !important;
}
.konkur-title { display: none !important; }
.konkur-desc {
  width: 100% !important;
  margin: 0 !important;
  color: #6c5871 !important;
  font-size: .86rem !important;
  line-height: 2.05 !important;
  text-align: center !important;
}
.konkur-empty {
  padding: 20px;
  border: 1px dashed #d9b7df;
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  color: #735879;
  text-align: center;
  font-weight: 800;
}
@media only screen and (max-width: 620px) {
  .personnel-mode { width: calc(100% - 18px); padding: 16px 12px; border-radius: 22px; }
  .personnel-mode-actions { width: 100%; grid-template-columns: 1fr; }
  .konkur-founder-part,
  .konkur-part { grid-template-columns: 1fr !important; }
  .konkur-picture,
  .konkur-founder-picture { width: 96px !important; height: 96px !important; }
}

/* ==================== V4 PERSONNEL FINAL FIXES ==================== */
.personnel-mode,
.personnel-mode *,
.personnel-mode-btn,
.konkur-ranks,
.konkur-ranks * {
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  direction: rtl !important;
  unicode-bidi: plaintext;
}
.personnel-mode {
  width: min(1180px, 94%) !important;
  text-align: center !important;
}
.personnel-mode h2,
.personnel-mode p,
.personnel-mode-kicker,
.personnel-mode-actions,
.personnel-mode-btn {
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
}
.konkur-ranks {
  width: min(1220px, 95%) !important;
}
.konkur-founder-part,
.konkur-part {
  width: 100% !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch !important;
}
.konkur-base,
.konkur-founder-card {
  min-height: 365px !important;
  padding: 28px 22px 24px !important;
  border-radius: 30px !important;
  text-align: center !important;
  direction: rtl !important;
}
.konkur-founder-card {
  background: linear-gradient(180deg, #fff 0%, #fff3ff 100%) !important;
}
.konkur-picture,
.konkur-founder-picture {
  width: 146px !important;
  height: 146px !important;
  min-width: 146px !important;
  min-height: 146px !important;
  margin-bottom: 8px !important;
}
.konkur-name {
  width: 100% !important;
  font-size: 1.13rem !important;
  line-height: 1.9 !important;
  text-align: center !important;
  direction: rtl !important;
  unicode-bidi: plaintext !important;
}
.konkur-desc {
  width: min(100%, 320px) !important;
  margin: 0 auto !important;
  font-size: .94rem !important;
  line-height: 2.15 !important;
  text-align: center !important;
  direction: rtl !important;
  unicode-bidi: plaintext !important;
  overflow-wrap: anywhere !important;
}
@media only screen and (max-width: 700px) {
  .konkur-founder-part,
  .konkur-part { grid-template-columns: 1fr !important; }
  .konkur-base,
  .konkur-founder-card { min-height: auto !important; padding: 24px 16px !important; }
  .konkur-picture,
  .konkur-founder-picture {
    width: 124px !important;
    height: 124px !important;
    min-width: 124px !important;
    min-height: 124px !important;
  }
}
