:root{
  --ink:#172625;
  --ink2:#223432;
  --paper:#fbf8f1;
  --paper2:#f1ecdd;
  --chalk:#f5f3e7;
  --mustard:#e8b33d;
  --sage:#7a9d74;
  --clay:#c1533b;
  --white:#fff;
  --muted:#65706e;
  --line:rgba(23,38,37,.10);
  --shadow:0 18px 50px rgba(20,30,29,.10);
  --radius:20px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:"Vazirmatn",sans-serif;
  background:var(--paper);
  color:var(--ink);
  line-height:1.85;
  overflow-x:hidden;
}
body.modal-open{overflow:hidden}
a{text-decoration:none;color:inherit}
button{cursor:pointer;font:inherit}
img{max-width:100%;display:block}
ul{list-style:none}
.container{width:min(1180px,calc(100% - 40px));margin:auto}

/* Header */
header{
  position:sticky;top:0;z-index:100;
  background:rgba(23,38,37,.96);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(255,255,255,.09);
}
.nav{
  min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:25px;
}
.brand{display:flex;align-items:center;gap:11px;color:var(--chalk)}
.brand-badge{
  width:42px;height:42px;border-radius:13px;background:var(--mustard);
  color:var(--ink);display:grid;place-items:center;font-weight:900;font-size:19px;
  overflow:hidden;
}
.brand-badge img{width:100%;height:100%;object-fit:contain}
.brand-text b{display:block;font-size:16px}
.brand-text span{display:block;font-size:10.5px;color:var(--sage);font-weight:700}
.nav-back{
  background:var(--mustard);color:var(--ink);font-weight:850;
  border-radius:10px;padding:10px 18px;font-size:13.5px;
  transition:.2s;display:inline-flex;align-items:center;gap:7px;border:0;
}
.nav-back:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(232,179,61,.22)}

/* Hero */
.teachers-hero{
  background:var(--ink);color:var(--chalk);padding:60px 0 50px;
  position:relative;overflow:hidden;
}
.teachers-hero::before{
  content:"";position:absolute;width:380px;height:380px;
  background:rgba(232,179,61,.07);border-radius:50%;
  right:-150px;top:-150px;filter:blur(80px);
}
.teachers-hero h1{font-size:38px;margin-bottom:12px}
.teachers-hero p{font-size:15px;color:rgba(245,243,231,.7);max-width:680px}

/* Teachers */
.teachers-section{background:var(--paper);padding:50px 0}
.group-title{
  font-size:24px;margin-bottom:26px;color:var(--ink2);
  border-right:4px solid var(--mustard);padding-right:14px;
}
.major-group-title{
  font-size:15px;font-weight:850;color:var(--clay);
  margin:34px 0 16px;letter-spacing:.2px;
}
.major-group-title:first-of-type{margin-top:0}
.teachers-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.teachers-grid-pair{grid-template-columns:repeat(2,1fr);max-width:560px}
.teacher-card{
  position:relative;background:#fff;border:1px solid var(--line);
  border-radius:20px;overflow:hidden;transition:transform .35s cubic-bezier(.16,1,.3,1),box-shadow .35s ease,border-color .35s ease;
  cursor:pointer;
}
.teacher-card:hover{
  transform:translateY(-10px) scale(1.02);
  box-shadow:0 22px 55px rgba(20,30,29,.13);
  border-color:rgba(122,157,116,.65);
}
/* قاب عکس استاد ارتفاع ثابت ندارد — مربع، با سقف ارتفاع تا در موبایل بیش از حد بلند نشود */
.teacher-photo{
  aspect-ratio:1/1;max-height:330px;
  display:grid;place-items:center;position:relative;overflow:hidden;
}
.teacher-photo-1{background:linear-gradient(145deg,#d9c49a,#8b9d7b)}
.teacher-photo-2{background:linear-gradient(145deg,#a9c4c0,#596f6a)}
.teacher-photo-3{background:linear-gradient(145deg,#e4c4b6,#a77d6f)}
.teacher-photo-4{background:linear-gradient(145deg,#d2c6df,#7d718b)}
.teacher-photo-5{background:linear-gradient(145deg,#c9d6a8,#7a8f5e)}
.teacher-photo-6{background:linear-gradient(145deg,#e8d5a0,#b58e4a)}
.teacher-photo-7{background:linear-gradient(145deg,#bcd0d4,#5f8285)}
.teacher-photo-8{background:linear-gradient(145deg,#e0c3ce,#a06a80)}
.teacher-photo-9{background:linear-gradient(145deg,#d6cbb8,#8c7a5e)}
.teacher-photo-10{background:linear-gradient(145deg,#c7ccd9,#5f6b8a)}
.teacher-photo::before{
  content:"";position:absolute;width:180px;height:180px;border-radius:50%;
  background:rgba(255,255,255,.18);right:-55px;top:-55px;
}
/* نوشته «عکس استاد» فقط روی کارت‌هایی که عکس ندارن نمایش داده می‌شه.
   کارت‌هایی که عکس واقعی دارن کلاس has-photo می‌گیرن. */
.teacher-photo:empty:not(.has-photo)::after{
  content:"عکس استاد";
  font-size:12px;font-weight:700;color:rgba(245,243,231,.4);
  letter-spacing:.5px;
}
.teacher-photo.has-photo::before{display:none}
.teacher-body{padding:20px;position:relative}
.teacher-role{font-size:10px;color:var(--clay);font-weight:900}
.teacher-body h3{font-size:17px;margin:5px 0 7px}
.teacher-body p{font-size:11.5px;color:var(--muted);min-height:60px}
.teacher-tags{display:flex;gap:7px;margin-top:13px}
.teacher-tags span{
  background:var(--paper2);border-radius:20px;padding:4px 8px;
  font-size:9px;color:var(--ink);font-weight:800;
}
.teacher-body::after{
  content:"";position:absolute;right:0;bottom:0;width:0;height:3px;
  background:var(--sage);transition:width .4s ease;
}
.teacher-card:hover .teacher-body::after{width:100%}

/* Teacher Modal */
.teacher-modal{
  display:none;position:fixed;inset:0;z-index:9999;
  background:rgba(23,38,37,.85);backdrop-filter:blur(8px);
  align-items:center;justify-content:center;padding:20px;
  animation:fadeIn .3s ease;
}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.teacher-modal-content{
  background:#fff;border-radius:24px;max-width:680px;width:100%;
  box-shadow:0 25px 70px rgba(0,0,0,.3);
  display:flex;gap:0;overflow:hidden;position:relative;
  animation:slideUp .4s cubic-bezier(.16,1,.3,1);
}
@keyframes slideUp{from{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}
.teacher-modal-close{
  position:absolute;top:16px;left:16px;z-index:10;
  width:36px;height:36px;border-radius:50%;border:0;
  background:rgba(23,38,37,.75);color:#fff;font-size:24px;
  display:grid;place-items:center;cursor:pointer;
  transition:.2s;backdrop-filter:blur(4px);
}
.teacher-modal-close:hover{background:var(--clay);transform:rotate(90deg)}
.teacher-modal-photo{
  width:240px;flex-shrink:0;position:relative;
  background:linear-gradient(145deg,#e8e4d8,#d1cbb8);
}
/* در مودال هم فقط وقتی عکس واقعی نیست، این نوشته ظاهر می‌شه */
.teacher-modal-photo:not(.has-photo)::after{
  content:"عکس استاد";position:absolute;
  inset:0;display:grid;place-items:center;
  font-size:14px;font-weight:700;color:rgba(23,38,37,.25);
}
.teacher-modal-body{
  padding:32px 28px;flex:1;overflow-y:auto;max-height:85vh;
}
.teacher-modal-body .teacher-role{
  display:inline-block;font-size:11px;color:var(--clay);
  font-weight:900;margin-bottom:6px;
}
.teacher-modal-body h2{font-size:22px;margin-bottom:12px;color:var(--ink)}
.teacher-modal-body>p{font-size:14px;line-height:1.8;color:var(--muted);margin-bottom:18px}
.teacher-modal-body .teacher-tags{
  display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px;
}
.teacher-modal-body .teacher-tags span{
  background:var(--paper2);color:var(--ink);
  padding:6px 14px;border-radius:20px;font-size:11px;font-weight:800;
  border:1px solid var(--line);
}
.teacher-modal-details{
  background:var(--paper);border:1px solid var(--line);
  border-radius:14px;padding:20px 22px;
}
.teacher-modal-details h3{
  font-size:15px;margin-bottom:12px;color:var(--ink2);
}
.teacher-modal-details ul{list-style:none;padding:0;margin:0}
.teacher-modal-details li{
  padding:10px 0;border-bottom:1px dashed var(--line);
  font-size:13px;color:var(--ink);position:relative;padding-right:18px;
}
.teacher-modal-details li:last-child{border-bottom:none}
.teacher-modal-details li::before{
  content:"◈";position:absolute;right:0;color:var(--sage);font-size:12px;
}

/* Footer */
footer{background:var(--ink);color:var(--chalk);padding:50px 0 30px;margin-top:80px}
.footer-brand{display:flex;align-items:center;gap:11px;margin-bottom:32px}
.footer-brand .brand-badge{background:var(--mustard)}
.footer-text{font-size:13px;color:rgba(245,243,231,.65);margin-bottom:40px;max-width:520px}
.footer-links{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;margin-bottom:40px}
.footer-title{font-size:15px;margin-bottom:14px;color:var(--chalk)}
.footer-links ul li{margin-bottom:8px}
.footer-links a{
  font-size:12.5px;color:rgba(245,243,231,.62);
  transition:.2s;display:inline-block;
}
.footer-links a:hover{color:var(--mustard);transform:translateX(-3px)}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);padding-top:24px;
  text-align:center;font-size:12px;color:rgba(245,243,231,.5);
}

/* Responsive */
@media(max-width:950px){
  .teachers-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .teachers-hero h1{font-size:28px}
  .footer-links{grid-template-columns:1fr 1fr}
  .teacher-modal-content{flex-direction:column;max-width:90%}
  .teacher-modal-photo{width:100%;height:auto;aspect-ratio:4/3;max-height:45vh}
  .teacher-modal-body{padding:24px 20px}
}
@media(max-width:500px){
  .teachers-grid{grid-template-columns:1fr}
  .teachers-grid-pair{grid-template-columns:1fr}
  .footer-links{grid-template-columns:1fr}
}
@media(max-width:380px){
  .nav-back{padding:9px 12px;font-size:0}
  .nav-back span:first-child{font-size:14px}
  .group-title{font-size:19px;padding-right:10px}
  .teachers-hero h1{font-size:24px}
  .teachers-hero p{font-size:13px}
  .teacher-modal-photo{aspect-ratio:3/2;max-height:38vh}
}

/* ══════════ حالت تیره ══════════ */
.theme-toggle{
  position:fixed;left:20px;bottom:20px;width:45px;height:45px;border:0;border-radius:50%;
  background:var(--ink);color:var(--chalk);font-size:18px;cursor:pointer;
  display:grid;place-items:center;z-index:9980;box-shadow:0 12px 30px rgba(0,0,0,.22);
  transition:.25s;
}
.theme-toggle:hover{transform:translateY(-4px) scale(1.06)}

html.dark body{
  --paper:#131f1e;
  --paper2:#1c2b29;
  --line:rgba(245,243,231,.12);
  --muted:#9aaba5;
  color:#eef0e6;
}
html.dark .teacher-card,
html.dark .teacher-modal-content{
  background:#1c2b29;border-color:rgba(245,243,231,.10);
}
html.dark .teacher-modal-details{background:#22332f}
html.dark .teacher-tags span{background:#22332f}

/* ══════════ محتوای ثابت صفحه (معرفی کادر + سوالات متداول) ══════════ */
.static-info{background:var(--paper2)}
.static-info p{font-size:14.6px;color:var(--ink2);margin-bottom:14px;max-width:860px;line-height:1.95}
.static-info b{font-weight:850}

.info-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));
  gap:16px;margin-top:24px;
}
.info-card{
  background:#fff;border:1px solid var(--line);border-radius:16px;padding:21px;
  box-shadow:0 6px 20px rgba(20,30,29,.05);
}
.info-card .ic{font-size:27px;margin-bottom:9px}
.info-card h3{font-size:15.5px;font-weight:850;margin-bottom:7px;color:var(--ink2)}
.info-card p{font-size:13.3px;color:var(--muted);margin-bottom:11px;line-height:1.85}
.info-card a{color:var(--clay);font-size:12.6px;font-weight:850}
.info-card a:hover{text-decoration:underline}

.q{
  border:1px solid var(--line);border-radius:13px;background:#fff;
  margin-bottom:11px;overflow:hidden;max-width:860px;
}
.q summary{
  padding:15px 18px;font-weight:850;font-size:14.4px;cursor:pointer;list-style:none;
  display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--ink2);
}
.q summary::-webkit-details-marker{display:none}
.q summary::after{content:"+";font-size:20px;color:var(--mustard);font-weight:900;flex:0 0 auto}
.q[open] summary::after{content:"−"}
.q .a{padding:0 18px 16px;font-size:14px;color:var(--ink2);line-height:1.9}

@media(max-width:620px){
  .static-info p{font-size:13.6px}
  .info-grid{grid-template-columns:1fr}
}

/* ══════════ عکس استادها به‌صورت تگ img واقعی (برای گوگل تصاویر) ══════════ */
.teacher-photo img,
.teacher-modal-photo img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.teacher-photo{overflow:hidden}
.teacher-modal-photo{overflow:hidden}

/* ── جلوگیری از بیرون‌زدگی افقی در گوشی ── */
html,body{max-width:100%;overflow-x:hidden}
@supports (overflow-x:clip){html,body{overflow-x:clip}}

/* دکمه‌ی بازگشت: یکدست با بقیه‌ی صفحه‌ها */
.nav-back{text-decoration:none;font-family:inherit;line-height:1.6;white-space:nowrap;-webkit-appearance:none;appearance:none;
  background:var(--mustard)!important;color:var(--ink)!important;box-shadow:0 6px 18px rgba(232,179,61,.18)}
.nav-back:hover{background:#f0c25a!important}
@media(max-width:640px){.nav-back{padding:8px 13px;font-size:12px}}

/* دکمه‌ی نصب اپلیکیشن پایین صفحه */
.app-dl{display:flex;justify-content:center;margin:18px 0 6px}
.app-dl .install-app{color:#f5f3e7}
