:root{--navy:#3a3d41;--navy2:#494c51;--gold:#ff6a00;--gold-d:#e85f00;--bg:#fff;--card:#fff;--ink:#242525;--muted:#848990;--line:#e4e5e6;--green:#18794e;--red:#c0392b;--amber:#b8860b;--blue:#1a56db;--surface:#f8f8f8;--radius:14px;--radius-lg:42px;--shadow:0 10px 30px rgba(58,61,65,.08)}
[data-theme="dark"]{--bg:#151617;--card:#202223;--surface:#1b1c1d;--ink:#f4f4f4;--muted:#a3a6aa;--line:#383b3e;--shadow:0 10px 30px rgba(0,0,0,.32)}
*{margin:0;padding:0;box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:'iranyekan','Vazirmatn',Tahoma,sans-serif;background:var(--bg);color:var(--ink);line-height:1.8;direction:rtl}a{color:inherit;text-decoration:none}.container{max-width:1200px;margin:auto;padding:0 20px}
.btn{border:none;border-radius:8px;padding:11px 24px;font-weight:700;font-size:14px;transition:.18s;display:inline-flex;align-items:center;gap:8px;justify-content:center;cursor:pointer}.btn-gold{background:var(--gold);color:#fff}.btn-gold:hover{background:var(--gold-d);transform:translateY(-1px)}.btn-navy{background:var(--navy);color:#fff}.btn-navy:hover{background:#242525}.btn-green{background:var(--green);color:#fff}.btn-red{background:var(--red);color:#fff}.btn-ghost{background:rgba(255,255,255,.82);color:var(--ink);border:1px solid var(--ink)}.btn-sm{padding:8px 16px;font-size:13px}.btn-block{width:100%}.btn[disabled]{opacity:.55;cursor:not-allowed}
header{position:relative;z-index:200;background:#fff;border-bottom:1px solid #e4e5e6}[data-theme="dark"] header{background:#202223}.navbar{display:flex;align-items:center;justify-content:space-between;min-height:104px;padding:18px 0;gap:28px}.brand{display:flex;align-items:center;gap:12px;min-width:180px}.brand img{width:56px;height:56px;border-radius:8px;object-fit:cover}.brand-name{font-size:21px;font-weight:900;color:var(--ink)}.brand-name small{display:block;font-size:10px;color:var(--muted);font-weight:600;letter-spacing:.8px}.nav-links{display:flex;align-items:center;justify-content:center;gap:27px;flex:1}.nav-links a{color:#3a3d41;font-weight:600;font-size:14px;white-space:nowrap}.nav-links a:hover{color:#ff6a00}[data-theme="dark"] .nav-links a{color:#f1f1f1}.nav-actions{display:flex;gap:8px;align-items:center;min-width:200px;justify-content:flex-start}.icon-btn{position:relative;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:8px;width:38px;height:38px;font-size:16px;cursor:pointer}.icon-btn .dot{position:absolute;top:-4px;left:-4px;background:var(--red);color:#fff;border-radius:50%;min-width:16px;height:16px;font-size:10px;display:flex;align-items:center;justify-content:center;padding:0 3px}.theme-btn{background:transparent;border:1px solid var(--line);border-radius:8px;width:38px;height:38px;cursor:pointer}.announce{background:#f9f9f9;color:#797979;border-bottom:1px solid #e3e3e3;text-align:center;padding:4px 8px;font-size:12px;font-weight:600;min-height:25px}
.hero{color:var(--ink);padding:0 0 42px;position:relative;overflow:hidden;background:var(--bg)}.hero-grid{max-width:1200px;min-height:550px;margin:56px auto 0;padding:0 20px;position:relative;z-index:1;display:block}.hero-grid>div:first-child{position:absolute;top:90px;right:20px;width:550px;max-width:calc(100% - 40px);min-height:399px;padding:28px 24px;background:rgba(255,255,255,.24);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);border:1px solid #242525;border-radius:14px;z-index:10;text-align:right}.hero-badge{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.75);border:1px solid #e4e5e6;border-radius:42px;padding:7px 14px;color:#494c51;font-size:12px;margin-bottom:18px}.hero h1{font-size:40px;font-weight:900;line-height:1.35;color:#242525;margin:0 0 18px;letter-spacing:-.4px}.hero h1 .hl{color:#ff6a00}.hero p{color:#494c51;font-size:16px;line-height:2;margin:0 0 26px;max-width:520px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap}.hero-stats{display:flex;gap:42px;margin-top:28px}.hero-stats b{display:block;font-size:24px;color:#ff6a00;font-weight:900}.hero-stats span{color:#7b7b7b;font-size:12px}
.hero-media{position:absolute!important;inset:0!important;width:100%!important;height:550px!important;margin:0!important;padding:0!important;background:#f8f8f8!important;border:0!important;border-radius:42px!important;overflow:hidden!important;box-shadow:none!important;z-index:0}.hero-media video{width:100%!important;height:100%!important;display:block;object-fit:cover;border-radius:42px;background:#f8f8f8}.hero-media[style*="display:none"],.hero-media[style*="display: none"]{display:block!important;visibility:hidden!important}
[data-theme="dark"] .hero-grid>div:first-child{background:rgba(32,34,35,.55);border-color:#848990}[data-theme="dark"] .hero h1{color:#fff}[data-theme="dark"] .hero p{color:#e4e5e6}[data-theme="dark"] .hero-badge{background:rgba(32,34,35,.75);color:#fff}
.section{padding:64px 0}.section.alt{background:#f8f8f8}.sec-head{margin-bottom:26px}.sec-kicker{color:#848990;font-weight:800;font-size:12px;letter-spacing:1.3px}.sec-title{font-size:29px;font-weight:900;color:#3a3d41;margin:3px 0 8px}.sec-sub{color:#848990;font-size:14px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}.card{background:#fff;border:1px solid #e4e5e6;border-radius:14px;box-shadow:0 8px 24px rgba(58,61,65,.06);padding:22px;transition:.2s}.card:hover{transform:translateY(-3px);box-shadow:0 16px 32px rgba(58,61,65,.10)}.card-icon{width:54px;height:54px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:24px;color:#fff;margin-bottom:14px}.card h3{font-size:17px;color:#333;font-weight:800;margin-bottom:7px}.card p{color:#848990;font-size:13px}.price{color:var(--green);font-weight:800;font-size:15px;margin-top:12px}.price s{color:#848990;font-weight:400;font-size:12px;margin-right:8px}.meta-tag{display:inline-block;background:#f8f8f8;border:1px solid #e4e5e6;border-radius:42px;padding:3px 12px;font-size:11px;font-weight:700;color:#494c51;margin-bottom:10px}.card-foot{margin-top:17px;display:flex;gap:8px;flex-wrap:wrap}
.live-banner{background:#3a3d41;color:#fff;border-radius:14px;padding:22px 28px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;box-shadow:0 12px 32px rgba(58,61,65,.16)}.live-banner small{display:block;color:#e4e5e6;margin-top:4px}.live-dot{width:11px;height:11px;border-radius:50%;background:#ff4c4c;display:inline-block;animation:blink 1.2s infinite;margin-left:8px}@keyframes blink{50%{opacity:.35}}
.watch-wrap{display:grid;grid-template-columns:1.7fr 1fr;gap:20px;align-items:start}.video-stage{background:#000;border-radius:14px;overflow:hidden;position:relative;box-shadow:0 16px 40px rgba(58,61,65,.16)}.video-stage video{width:100%;display:block;aspect-ratio:16/9;background:#000}.stage-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:rgba(36,37,37,.88);color:#e4e5e6}.chat-box{background:#fff;border:1px solid #e4e5e6;border-radius:14px;display:flex;flex-direction:column;height:100%;min-height:420px;overflow:hidden}.chat-head{padding:14px 18px;border-bottom:1px solid #e4e5e6;font-weight:800;color:#3a3d41}.chat-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.chat-msg{background:#f8f8f8;border-radius:14px;padding:9px 13px;font-size:13px;color:#3a3d41}.chat-msg b{color:#3a3d41;font-size:12.5px;display:flex;justify-content:space-between}.chat-msg b span{color:#848990;font-weight:400;font-size:11px}.chat-msg.teacher-msg{background:#fff4ea;border:1px solid #ffd5bb}.chat-input{display:flex;gap:8px;padding:12px;border-top:1px solid #e4e5e6}.chat-input input{flex:1;border:1px solid #e4e5e6;border-radius:8px;padding:10px 14px;font-family:inherit;background:#fff;color:#3a3d41}.viewers-badge{background:#f8f8f8;border:1px solid #e4e5e6;border-radius:42px;padding:3px 14px;font-size:12px;font-weight:700;color:#3a3d41}
.table-wrap{overflow-x:auto;background:#fff;border:1px solid #e4e5e6;border-radius:14px}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:12px 15px;text-align:right;border-bottom:1px solid #e4e5e6;white-space:nowrap}th{background:#f8f8f8;color:#848990;font-size:12px}.st{padding:4px 12px;border-radius:42px;font-size:11px;font-weight:700}.st.ok{background:#e7f4ed;color:#18794e}.st.no{background:#fdebea;color:#c0392b}.st.wait{background:#fff4d8;color:#a97800}.st.info{background:#edf2fe;color:#235fcf}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:24px}.kpi{background:#fff;border:1px solid #e4e5e6;border-radius:14px;padding:18px;box-shadow:0 8px 24px rgba(58,61,65,.06)}.kpi span{color:#848990;font-size:12px}.kpi b{display:block;font-size:22px;font-weight:900;margin-top:6px;color:#3a3d41}.kpi b.gold{color:#ff6a00}.kpi b.green{color:#18794e}
.field{margin-bottom:14px}.field label{display:block;font-size:12px;color:#848990;margin-bottom:6px;font-weight:700}.field input,.field select,.field textarea{width:100%;border:1px solid #e4e5e6;border-radius:8px;padding:11px 14px;font-size:14px;font-family:inherit;background:#fff;color:#3a3d41}.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:#ff6a00;box-shadow:0 0 0 3px rgba(255,106,0,.08)}
.modal{display:none;position:fixed;inset:0;background:rgba(36,37,37,.58);z-index:400;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(5px)}.modal.open{display:flex}.mbox{background:#fff;border-radius:14px;padding:28px;width:100%;max-width:460px;position:relative;animation:pop .25s;max-height:92vh;overflow-y:auto;color:#3a3d41;box-shadow:0 24px 70px rgba(58,61,65,.2)}.mbox.wide{max-width:720px}@keyframes pop{from{transform:scale(.96);opacity:0}}.mbox h2{font-size:20px;margin-bottom:18px;color:#3a3d41}.mclose{position:absolute;left:18px;top:16px;cursor:pointer;color:#848990;font-size:20px;background:none;border:none}.ltabs,.roles{display:flex;gap:8px;margin-bottom:18px}.ltabs button,.roles button{flex:1;padding:10px;border-radius:8px;border:1px solid #e4e5e6;background:#fff;font-weight:700;font-size:13px;color:#848990;cursor:pointer}.ltabs button.active,.roles button.active{border-color:#ff6a00;color:#ff6a00;background:#fff7f0}
.dash{display:none;padding:36px 0 70px;min-height:80vh}.dash.open{display:block}.dash-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:14px;margin-bottom:24px}.dash-head h2{font-size:23px;font-weight:900;color:#3a3d41}.dash-head small{color:#848990}.tabs{display:flex;gap:8px;margin-bottom:22px;flex-wrap:wrap}.tabs button{border:1px solid #e4e5e6;background:#fff;border-radius:8px;padding:9px 18px;font-weight:700;font-size:13px;color:#848990;cursor:pointer;transition:.15s}.tabs button.active{border-color:#ff6a00;color:#ff6a00;background:#fff7f0}.panel{display:none}.panel.show{display:block;animation:fade .25s}@keyframes fade{from{opacity:0;transform:translateY(6px)}}
.pill{background:#f8f8f8;border:1px solid #e4e5e6;border-radius:42px;padding:5px 15px;font-size:12px;font-weight:700}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.progress{height:8px;background:#e4e5e6;border-radius:8px;overflow:hidden;margin-top:11px}.progress>div{height:100%;background:linear-gradient(90deg,#ff6a00,#ff8b32);border-radius:8px}.skeleton{border-radius:14px;background:linear-gradient(90deg,#e4e5e6 25%,#f8f8f8 50%,#e4e5e6 75%);background-size:200% 100%;animation:sk 1.3s infinite;min-height:120px}@keyframes sk{to{background-position:-200% 0}}.on-air{background:#3a3d41;color:#fff;font-weight:800;font-size:12px;border-radius:42px;padding:5px 15px;display:inline-flex;align-items:center;gap:8px}
#toast{position:fixed;bottom:24px;right:50%;transform:translateX(50%);background:#3a3d41;color:#fff;padding:13px 26px;border-radius:8px;font-weight:600;font-size:13px;display:none;z-index:600;box-shadow:0 12px 32px rgba(58,61,65,.2);max-width:90vw}[data-theme="dark"] #toast{background:#ff6a00;color:#fff}.empty{color:#848990;text-align:center;padding:32px 10px;font-size:14px}footer{background:#3a3d41;color:#e4e5e6;padding:46px 0 28px}.foot-grid{display:flex;justify-content:space-between;gap:30px;flex-wrap:wrap;align-items:center}#socialLinks a{margin-left:12px;font-size:18px}.lesson-item{display:flex;justify-content:space-between;align-items:center;padding:11px 15px;border:1px solid #e4e5e6;border-radius:8px;margin-bottom:8px;background:#fff}.lesson-item.done{border-color:#18794e;background:#f3fbf6}.badge-new{background:#c0392b;color:#fff;font-size:10px;border-radius:8px;padding:1px 7px;margin-right:6px}.bar-chart{display:flex;align-items:flex-end;gap:6px;height:140px;padding:10px 0}.bar-chart .bar{flex:1;background:linear-gradient(180deg,#ff6a00,#e85f00);border-radius:6px 6px 0 0;min-width:8px;position:relative}.bar-chart .bar:hover::after{content:attr(data-v);position:absolute;top:-24px;right:50%;transform:translateX(50%);background:#3a3d41;color:#fff;font-size:10px;padding:2px 8px;border-radius:6px;white-space:nowrap}
@media(max-width:960px){.hero-grid{min-height:560px}.hero-grid>div:first-child{right:20px;left:20px;width:auto;max-width:none;top:82px}.hero h1{font-size:31px}.nav-links{display:none}.nav-actions{min-width:auto}.watch-wrap,.two-col{grid-template-columns:1fr}.chat-box{min-height:320px}}
@media(max-width:680px){.container{padding:0 14px}.navbar{min-height:82px;padding:12px 0}.brand img{width:46px;height:46px}.brand-name{font-size:18px}.hero{padding-bottom:24px}.hero-grid{min-height:490px;margin-top:28px;padding:0 14px}.hero-media,.hero-media video{height:490px!important;border-radius:28px!important}.hero-grid>div:first-child{top:55px;right:14px;left:14px;padding:24px 18px;min-height:380px}.hero h1{font-size:27px}.hero p{font-size:14px}.hero-stats{gap:18px}.section{padding:48px 0}.sec-title{font-size:24px}.grid{grid-template-columns:1fr}.live-banner{padding:18px}.modal{padding:10px}.mbox{padding:24px 20px}}


/* MAHED DARK MODE COMPLETE OVERRIDES */
[data-theme="dark"] body,[data-theme="dark"] main,[data-theme="dark"] .section,[data-theme="dark"] .dashboard,[data-theme="dark"] .panel,[data-theme="dark"] .modal-content,[data-theme="dark"] .card,[data-theme="dark"] .course-card,[data-theme="dark"] .ticket-card,[data-theme="dark"] .table-wrap,[data-theme="dark"] .lesson-item{color:var(--ink);}
[data-theme="dark"] .card,[data-theme="dark"] .panel,[data-theme="dark"] .modal-content,[data-theme="dark"] .course-card,[data-theme="dark"] .ticket-card,[data-theme="dark"] .table-wrap{background:var(--card);border-color:var(--line);}
[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select{background:#1b1c1d!important;color:#f4f4f4!important;border-color:#383b3e!important;}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#8f9499}
[data-theme="dark"] .btn-ghost,[data-theme="dark"] .icon-btn{background:#202223;color:#f4f4f4;border-color:#383b3e}
[data-theme="dark"] .empty,[data-theme="dark"] .muted,[data-theme="dark"] .small{color:#a3a6aa}
[data-theme="dark"] .lesson-item{border-color:#383b3e;background:#202223}
[data-theme="dark"] .lesson-item.done{background:#18251e}
[data-theme="dark"] footer{background:#111213}


/* FINAL DARK USERNAME VISIBILITY */
[data-theme="dark"] header .user-name,
[data-theme="dark"] header .username,
[data-theme="dark"] header .profile-name,
[data-theme="dark"] header .user-menu,
[data-theme="dark"] header .user-menu span,
[data-theme="dark"] header .user-menu strong,
[data-theme="dark"] header .nav-user,
[data-theme="dark"] header .nav-user-name,
[data-theme="dark"] header .account-name{
  color:#fff !important;
  opacity:1 !important;
  visibility:visible !important;
}
[data-theme="dark"] header .nav-actions span,
[data-theme="dark"] header .nav-actions strong{
  color:#fff !important;
  opacity:1 !important;
}
[data-theme="dark"] header .nav-actions svg{
  color:#fff !important;
  fill:currentColor;
}

/* MAHED USERNAME WHITE BOX FIX */
[data-theme="dark"] header .nav-actions .user-name,
[data-theme="dark"] header .nav-actions .username,
[data-theme="dark"] header .nav-actions .profile-name,
[data-theme="dark"] header .nav-actions .nav-user-name,
[data-theme="dark"] header .nav-actions .user-menu span,
[data-theme="dark"] header .nav-actions .user-menu strong,
[data-theme="dark"] header .nav-actions .user-menu .name,
[data-theme="dark"] header .nav-actions [class*="user"]{
  color:#111827 !important;
  opacity:1 !important;
  visibility:visible !important;
}

/* MAHED GLOBAL DARK PANEL + STREAM FIX */
[data-theme="dark"] .pill,
[data-theme="dark"] .tabs button,
[data-theme="dark"] .kpi,
[data-theme="dark"] .chat-box,
[data-theme="dark"] .chat-body,
[data-theme="dark"] .chat-head,
[data-theme="dark"] .chat-msg,
[data-theme="dark"] .viewers-badge,
[data-theme="dark"] .account-card,
[data-theme="dark"] .account-chat,
[data-theme="dark"] .account-peer {
  background:#202223 !important;
  color:#f4f4f4 !important;
  border-color:#383b3e !important;
}

[data-theme="dark"] .dash,
[data-theme="dark"] #livePage,
[data-theme="dark"] #livePage > .container,
[data-theme="dark"] #dashStudent,
[data-theme="dark"] #dashTeacher,
[data-theme="dark"] #dashAdmin,
[data-theme="dark"] .watch-wrap,
[data-theme="dark"] .two-col {
  background:var(--bg) !important;
  color:var(--ink) !important;
}

[data-theme="dark"] .dash-head h2,
[data-theme="dark"] .dash-head small,
[data-theme="dark"] .panel h2,
[data-theme="dark"] .panel h3,
[data-theme="dark"] .panel b,
[data-theme="dark"] .kpi b,
[data-theme="dark"] .field label {
  color:var(--ink) !important;
}

[data-theme="dark"] .chat-body,
[data-theme="dark"] .chat-msg {
  background:#1b1c1d !important;
}

[data-theme="dark"] #livePage .chat-box {
  background:#202223 !important;
}

[data-theme="dark"] #livePage .video-stage {
  background:#111213 !important;
}

[data-theme="dark"] #livePage .viewerCameraControls,
[data-theme="dark"] #teacherLiveExtra {
  color:var(--ink) !important;
}

[data-theme="dark"] .lesson-item,
[data-theme="dark"] .account-tools,
[data-theme="dark"] .account-empty {
  color:var(--ink) !important;
}

[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea {
  background:#1b1c1d !important;
  color:#f4f4f4 !important;
  border-color:#383b3e !important;
}
/* =========================================================
   MAHED MOBILE OPTIMIZATION
   ========================================================= */

html,
body{
  max-width:100%;
  overflow-x:hidden;
}

img,
video,
iframe{
  max-width:100%;
}

button,
.btn,
input,
select,
textarea{
  -webkit-tap-highlight-color:transparent;
}

button,
.btn{
  touch-action:manipulation;
}

/* =========================
   TABLET / MOBILE
   ========================= */
@media (max-width:768px){

  .container{
    width:100%;
    padding-left:16px;
    padding-right:16px;
  }

  header{
    position:sticky;
    top:0;
    z-index:1000;
  }

  .navbar{
    min-height:64px;
    gap:8px;
  }

  .brand{
    font-size:20px;
    white-space:nowrap;
  }

  .nav-actions{
    gap:6px;
    flex-wrap:nowrap;
  }

  .nav-actions .btn{
    padding:9px 11px;
    font-size:13px;
  }

  .theme-btn{
    width:38px;
    height:38px;
    min-width:38px;
  }

  .hero{
    padding:64px 0 48px !important;
  }

  .hero h1{
    font-size:clamp(30px,8vw,44px);
    line-height:1.15;
  }

  .hero p{
    font-size:15px;
    line-height:1.9;
  }

  .hero-actions{
    flex-wrap:wrap;
    gap:8px;
  }

  .hero-actions .btn{
    flex:1 1 160px;
  }

  section{
    padding:42px 0 !important;
  }

  .section-head{
    gap:12px;
    align-items:flex-start;
    flex-direction:column;
  }

  .section-head h2{
    font-size:24px;
  }

  .grid,
  .cards,
  .course-grid,
  .features-grid,
  .two-col,
  .three-col{
    grid-template-columns:1fr !important;
  }

  .dash{
    padding:18px 0 40px !important;
  }

  .dash-head{
    gap:12px;
    align-items:flex-start !important;
    flex-direction:column !important;
  }

  .dash-head h2{
    font-size:23px;
  }

  .dash-head small{
    line-height:1.7;
  }

  .tabs{
    display:flex;
    overflow-x:auto;
    gap:8px;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .tabs::-webkit-scrollbar{
    display:none;
  }

  .tabs button{
    flex:0 0 auto;
    white-space:nowrap;
  }

  .kpis,
  .kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px;
  }

  .kpi{
    min-width:0;
    padding:14px;
  }

  .kpi b{
    font-size:20px;
  }

  .account-tools{
    grid-template-columns:1fr !important;
  }

  .account-card,
  .account-chat,
  .account-peer{
    min-width:0;
  }

  .account-avatar{
    width:72px;
    height:72px;
    min-width:72px;
  }

  .table-wrap,
  .table-responsive{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  table{
    min-width:620px;
  }

  .field input,
  .field select,
  .field textarea,
  input,
  select,
  textarea{
    font-size:16px;
    min-height:44px;
  }

  .field textarea{
    min-height:110px;
  }

  .btn{
    min-height:44px;
  }

  .modal-card{
    width:calc(100vw - 24px) !important;
    max-width:none !important;
    margin:12px !important;
    max-height:calc(100vh - 24px);
    overflow-y:auto;
  }

  #livePage .container{
    padding:20px 14px 40px !important;
  }

  #livePage .dash-head{
    margin-bottom:14px;
  }

  #livePage .video-stage{
    width:100%;
    min-height:220px;
  }

  #livePage .chat-box{
    min-height:280px;
  }

  #livePage .two-col{
    grid-template-columns:1fr !important;
  }

  #teacherLiveExtra{
    grid-template-columns:1fr !important;
  }

  #teacherLiveExtra .participants,
  #teacherLiveExtra .participant-list{
    display:flex;
    overflow-x:auto;
    gap:10px;
    padding-bottom:6px;
  }

  #teacherLiveExtra .participant,
  #teacherLiveExtra .participant-card{
    flex:0 0 180px;
  }

  .viewerCameraControls{
    display:flex !important;
    flex-wrap:wrap;
    gap:8px;
  }

  .toast{
    max-width:calc(100vw - 24px);
    left:12px !important;
    right:12px !important;
    width:auto !important;
  }

  footer .container{
    padding-left:16px;
    padding-right:16px;
  }
}

/* =========================
   SMALL PHONES
   ========================= */
@media (max-width:480px){

  .container{
    padding-left:12px;
    padding-right:12px;
  }

  .navbar{
    min-height:58px;
  }

  .brand{
    font-size:18px;
  }

  .nav-actions .btn{
    padding:8px 9px;
    font-size:12px;
  }

  .theme-btn{
    width:36px;
    height:36px;
    min-width:36px;
  }

  .hero{
    padding-top:46px !important;
    padding-bottom:36px !important;
  }

  .hero h1{
    font-size:30px;
  }

  .hero p{
    font-size:14px;
  }

  .hero-actions .btn{
    flex:1 1 100%;
    width:100%;
  }

  .kpis,
  .kpi-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .kpi{
    padding:12px 10px;
  }

  .kpi b{
    font-size:18px;
  }

  .card,
  .panel{
    padding:14px !important;
  }

  .dash{
    padding-top:12px !important;
  }

  .dash-head h2{
    font-size:21px;
  }

  #livePage .video-stage{
    min-height:190px;
  }
}

/* =========================
   VERY SMALL PHONES
   ========================= */
@media (max-width:360px){

  .kpis,
  .kpi-grid{
    grid-template-columns:1fr !important;
  }

  .brand{
    font-size:17px;
  }

  .nav-actions .btn{
    padding:7px 8px;
    font-size:11px;
  }

  .hero h1{
    font-size:27px;
  }
}

/* =========================================================
   MAHED MOBILE HEADER + HERO FINAL FIX
   ========================================================= */

@media (max-width:768px){

  /* ---------- HEADER ---------- */

  .navbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:100%;
    min-width:0;
  }

  .brand{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
  }

  .brand-name{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .nav-actions{
    flex:0 0 auto !important;
    min-width:0 !important;
    width:auto !important;
    max-width:50%;
    gap:6px !important;
    display:flex !important;
    align-items:center;
    justify-content:flex-end !important;
  }

  #authArea{
    display:flex !important;
    align-items:center;
    gap:6px !important;
    min-width:0;
    max-width:100%;
  }

  #authArea .btn{
    flex:0 0 auto;
    white-space:nowrap;
    width:auto;
    min-width:0;
  }

  #authArea .btn-ghost,
  #authArea .btn-gold{
    padding:7px 10px !important;
    font-size:12px !important;
  }

  .nav-actions .theme-btn{
    flex:0 0 36px;
  }

  /* ---------- HERO ---------- */

  .hero{
    overflow:hidden;
  }

  .hero-grid{
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    margin-top:18px !important;
    padding:0 12px !important;
    gap:14px !important;
  }

  .hero-grid > div:first-child{
    position:relative !important;
    top:auto !important;
    right:auto !important;
    left:auto !important;
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
    padding:20px 16px !important;
    box-sizing:border-box !important;
    z-index:2 !important;
    order:1 !important;
  }

  .hero-media{
    position:relative !important;
    inset:auto !important;
    width:100% !important;
    height:260px !important;
    min-height:260px !important;
    margin:0 !important;
    order:2 !important;
    z-index:1 !important;
    border-radius:24px !important;
  }

  .hero-media video{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    border-radius:24px !important;
  }

  .hero-badge{
    max-width:100%;
    font-size:11px !important;
    padding:6px 10px !important;
    margin-bottom:12px !important;
  }

  .hero h1{
    font-size:27px !important;
    line-height:1.4 !important;
    margin-bottom:12px !important;
  }

  .hero p{
    font-size:14px !important;
    line-height:1.9 !important;
    margin-bottom:18px !important;
  }

  .hero-actions{
    width:100%;
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
  }

  .hero-actions .btn{
    width:100% !important;
    flex:0 0 auto !important;
    box-sizing:border-box;
  }

  .hero-stats{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    margin-top:18px !important;
  }

  .hero-stats > *{
    min-width:0;
    text-align:center;
  }
}

@media (max-width:480px){

  .navbar{
    gap:5px !important;
  }

  .brand img{
    width:40px !important;
    height:40px !important;
  }

  .brand-name{
    font-size:16px !important;
  }

  .brand-name small{
    font-size:8px !important;
  }

  .nav-actions{
    gap:4px !important;
    max-width:55%;
  }

  #authArea{
    gap:4px !important;
  }

  #authArea .btn-ghost,
  #authArea .btn-gold{
    padding:7px 8px !important;
    font-size:11px !important;
  }

  .hero-grid{
    padding:0 10px !important;
  }

  .hero-grid > div:first-child{
    padding:18px 14px !important;
  }

  .hero h1{
    font-size:24px !important;
  }

  .hero-media{
    height:220px !important;
    min-height:220px !important;
    border-radius:20px !important;
  }

  .hero-media video{
    border-radius:20px !important;
  }
}

@media (max-width:360px){

  .brand-name{
    display:none;
  }

  .nav-actions{
    max-width:65%;
  }

  #authArea .btn-ghost,
  #authArea .btn-gold{
    padding:6px 7px !important;
    font-size:10px !important;
  }

  .theme-btn{
    width:34px !important;
    min-width:34px !important;
    height:34px !important;
  }
}


/* =========================================================
   MAHED / LINGOPHOENIX-STYLE MOTION SYSTEM
   ========================================================= */

@media (prefers-reduced-motion: no-preference){

  .mahed-reveal{
    opacity:0;
    transform:translateY(28px);
    transition:
      opacity .75s cubic-bezier(.22,1,.36,1),
      transform .75s cubic-bezier(.22,1,.36,1);
    will-change:opacity,transform;
  }

  .mahed-reveal.is-visible{
    opacity:1;
    transform:none;
  }

  .mahed-reveal-left{
    opacity:0;
    transform:translateX(36px);
    transition:
      opacity .8s cubic-bezier(.22,1,.36,1),
      transform .8s cubic-bezier(.22,1,.36,1);
  }

  .mahed-reveal-left.is-visible{
    opacity:1;
    transform:none;
  }

  .mahed-reveal-right{
    opacity:0;
    transform:translateX(-36px);
    transition:
      opacity .8s cubic-bezier(.22,1,.36,1),
      transform .8s cubic-bezier(.22,1,.36,1);
  }

  .mahed-reveal-right.is-visible{
    opacity:1;
    transform:none;
  }

  .mahed-stagger > *{
    opacity:0;
    transform:translateY(18px);
    transition:
      opacity .65s cubic-bezier(.22,1,.36,1),
      transform .65s cubic-bezier(.22,1,.36,1);
  }

  .mahed-stagger.is-visible > *{
    opacity:1;
    transform:none;
  }

  .mahed-stagger.is-visible > *:nth-child(1){transition-delay:.05s}
  .mahed-stagger.is-visible > *:nth-child(2){transition-delay:.11s}
  .mahed-stagger.is-visible > *:nth-child(3){transition-delay:.17s}
  .mahed-stagger.is-visible > *:nth-child(4){transition-delay:.23s}
  .mahed-stagger.is-visible > *:nth-child(5){transition-delay:.29s}
  .mahed-stagger.is-visible > *:nth-child(6){transition-delay:.35s}

  .hero-grid > div:first-child{
    transition:
      transform .45s cubic-bezier(.22,1,.36,1),
      box-shadow .45s ease;
  }

  .hero-grid > div:first-child:hover{
    transform:translateY(-3px);
    box-shadow:0 18px 45px rgba(0,0,0,.08);
  }

  .hero-actions .btn,
  .section .btn,
  .card .btn,
  .hero-stats,
  .tabs button{
    transition:
      transform .22s ease,
      box-shadow .22s ease,
      background-color .22s ease,
      border-color .22s ease;
  }

  .hero-actions .btn:hover,
  .section .btn:hover,
  .card .btn:hover{
    transform:translateY(-2px);
  }

  .hero-media{
    transform:translateZ(0);
  }

  .hero-media video{
    transition:transform 1.2s cubic-bezier(.22,1,.36,1);
  }

  .hero-media:hover video{
    transform:scale(1.015);
  }

  .service-card,
  .feature-card,
  .course-card,
  .teacher-card{
    transition:
      transform .3s cubic-bezier(.22,1,.36,1),
      box-shadow .3s ease,
      border-color .3s ease;
  }

  .service-card:hover,
  .feature-card:hover,
  .course-card:hover,
  .teacher-card:hover{
    transform:translateY(-5px);
    box-shadow:0 14px 34px rgba(0,0,0,.08);
  }
}

@media (max-width:768px){
  .mahed-reveal-left,
  .mahed-reveal-right{
    transform:translateY(24px);
  }

  .hero-grid > div:first-child:hover{
    transform:none;
  }

  .hero-media:hover video{
    transform:none;
  }

  .service-card:hover,
  .feature-card:hover,
  .course-card:hover,
  .teacher-card:hover{
    transform:none;
    box-shadow:none;
  }
}

/* =========================================================
   MAHED PREMIUM SCROLL EXPERIENCE
   Added: 2026-09-13
   ========================================================= */

:root{
  --mahed-motion-ease:cubic-bezier(.22,.61,.36,1);
}

/* Larger / longer sections */
#landing > .section{
  padding-top:96px;
  padding-bottom:112px;
}

#landing > .section + .section{
  margin-top:0;
}

#landing > .section .container{
  position:relative;
}

#landing > .section .sec-head{
  margin-bottom:42px;
}

#landing > .section .sec-title{
  font-size:clamp(30px,3.1vw,42px);
  line-height:1.3;
}

#landing > .section .sec-sub{
  font-size:15px;
  line-height:2;
}

/* Bigger cards */
#landing .grid{
  grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
  gap:28px;
}

#landing .card{
  min-height:320px;
  padding:30px;
  border-radius:22px;
  transition:
    transform .45s var(--mahed-motion-ease),
    box-shadow .45s var(--mahed-motion-ease),
    border-color .45s var(--mahed-motion-ease);
}

#landing .card:hover{
  transform:translateY(-10px) scale(1.015);
  box-shadow:0 28px 60px rgba(58,61,65,.13);
}

/* Motion base */
.mahed-motion,
.mahed-section-motion,
.mahed-stagger-grid,
.mahed-visual-break,
.mahed-premium-card{
  will-change:transform,opacity;
}

/* Directional section motion */
.mahed-section-motion{
  opacity:0;
  transition:
    opacity .9s var(--mahed-motion-ease),
    transform 1s var(--mahed-motion-ease);
}

.mahed-from-right{
  transform:translateX(90px);
}

.mahed-from-left{
  transform:translateX(-90px);
}

.mahed-from-bottom{
  transform:translateY(90px);
}

.mahed-from-top{
  transform:translateY(-90px);
}

.mahed-section-motion.is-visible{
  opacity:1;
  transform:none;
}

/* Hero */
.mahed-motion{
  opacity:0;
  transition:
    opacity 1s var(--mahed-motion-ease),
    transform 1.1s var(--mahed-motion-ease);
}

.mahed-motion.mahed-from-right{
  transform:translateX(70px);
}

.mahed-motion.mahed-from-left{
  transform:translateX(-70px);
}

.mahed-motion.is-visible{
  opacity:1;
  transform:none;
}

/* Stagger */
.mahed-stagger-grid{
  opacity:1;
}

.mahed-stagger-item{
  opacity:0;
  transform:translateY(45px) scale(.97);
  transition:
    opacity .75s var(--mahed-motion-ease) var(--mahed-delay),
    transform .85s var(--mahed-motion-ease) var(--mahed-delay);
}

.mahed-stagger-grid.is-visible .mahed-stagger-item,
.mahed-section-motion.is-visible .mahed-stagger-item{
  opacity:1;
  transform:none;
}

/* Premium cards */
.mahed-premium-card{
  opacity:0;
  transform:translateY(35px) scale(.98);
  transition:
    opacity .7s var(--mahed-motion-ease) var(--mahed-card-delay),
    transform .8s var(--mahed-motion-ease) var(--mahed-card-delay),
    box-shadow .4s ease;
}

.mahed-premium-card.is-visible{
  opacity:1;
  transform:none;
}

/* Visual Break */
.mahed-visual-break{
  position:relative;
  min-height:640px;
  margin:20px 0 20px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  isolation:isolate;

  background:
    linear-gradient(
      180deg,
      rgba(20,18,15,.18),
      rgba(20,18,15,.58)
    ),
    var(--visual-break-image, url('/assets/mahed-visual-break.jpg')) center center / cover no-repeat;

  border-radius:32px;
  transform:translateY(70px) scale(.985);
  opacity:0;
  transition:
    opacity 1.1s var(--mahed-motion-ease),
    transform 1.2s var(--mahed-motion-ease);
}

.mahed-visual-break.is-visible{
  opacity:1;
  transform:none;
}

.mahed-visual-break-overlay{
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(
      circle at center,
      transparent 10%,
      rgba(0,0,0,.35) 100%
    );
}

.mahed-visual-break-content{
  max-width:760px;
  padding:40px 28px;
  color:#fff;
  text-shadow:0 2px 18px rgba(0,0,0,.28);
}

.mahed-visual-break-content span{
  display:inline-block;
  margin-bottom:18px;
  font-size:12px;
  letter-spacing:3px;
  font-weight:800;
  opacity:.85;
}

.mahed-visual-break-content h2{
  margin:0 0 18px;
  font-size:clamp(32px,5vw,62px);
  line-height:1.25;
  font-weight:900;
}

.mahed-visual-break-content p{
  margin:0 auto;
  max-width:620px;
  font-size:17px;
  line-height:2;
  color:rgba(255,255,255,.9);
}

/* Give alternating sections more visual rhythm */
#courses{
  background:
    radial-gradient(circle at 90% 15%,rgba(255,106,0,.045),transparent 30%),
    var(--bg);
}

#books{
  padding-top:118px;
  padding-bottom:126px;
}

#teachers{
  padding-top:116px;
  padding-bottom:126px;
}

/* FAQ breathing room */
#landing #faqWrap{
  gap:18px !important;
}

#landing #faqWrap > *,
#landing #faqWrap .faq-item,
#landing #faqWrap .faq-card{
  border-radius:18px;
}

/* Live section */
#liveSec{
  padding-top:68px !important;
  padding-bottom:75px !important;
}

#liveSec .live-banner{
  min-height:110px;
  padding:30px 34px;
  border-radius:22px;
}

/* Dark mode */
[data-theme="dark"] #courses{
  background:
    radial-gradient(circle at 90% 15%,rgba(255,106,0,.07),transparent 30%),
    var(--bg);
}

[data-theme="dark"] .mahed-visual-break{
  box-shadow:0 25px 70px rgba(0,0,0,.35);
}

/* Mobile */
@media(max-width:680px){
  #landing > .section{
    padding-top:70px;
    padding-bottom:78px;
  }

  #landing > .section .sec-head{
    margin-bottom:30px;
  }

  #landing > .section .sec-title{
    font-size:28px;
  }

  #landing .grid{
    grid-template-columns:1fr;
    gap:20px;
  }

  #landing .card{
    min-height:0;
    padding:24px;
  }

  .mahed-from-right{
    transform:translateX(45px);
  }

  .mahed-from-left{
    transform:translateX(-45px);
  }

  .mahed-from-bottom{
    transform:translateY(55px);
  }

  .mahed-from-top{
    transform:translateY(-55px);
  }

  .mahed-visual-break{
    min-height:520px;
    margin:12px 0;
    border-radius:24px;
  }

  .mahed-visual-break-content{
    padding:30px 20px;
  }

  .mahed-visual-break-content h2{
    font-size:34px;
  }

  .mahed-visual-break-content p{
    font-size:14px;
  }
}

@media(prefers-reduced-motion:reduce){
  .mahed-motion,
  .mahed-section-motion,
  .mahed-stagger-item,
  .mahed-premium-card,
  .mahed-visual-break{
    opacity:1 !important;
    transform:none !important;
    transition:none !important;
  }
}

/* ===== MAHED VISUAL BREAK PARALLAX ===== */
.mahed-visual-break{
  background-image:
    linear-gradient(
      180deg,
      rgba(20,18,15,.14),
      rgba(20,18,15,.52)
    ),
    var(--visual-break-image, url('/assets/mahed-visual-break.jpg'));

  background-size:112% auto;
  background-position:center 0%;
  background-repeat:no-repeat;
  transition:
    opacity 1.1s var(--mahed-motion-ease),
    transform 1.2s var(--mahed-motion-ease);
}

.mahed-visual-break.parallax-active{
  background-position:center var(--mahed-parallax-y, 0%);
}

@media(max-width:680px){
  .mahed-visual-break{
    background-size:auto 120%;
    background-position:center 0%;
  }
}

/* =========================================
   MAHED FULL SCROLLING PHOTO EXPERIENCE
   ========================================= */

#mahedVisualBreak{
  position:relative;
  height:100vh;
  min-height:760px;
  margin:0;
  padding:0;
  overflow:hidden;
  border-radius:0;
  isolation:isolate;

  background:none !important;

  opacity:0;
  transform:none !important;
  transition:opacity 1s ease;
}

#mahedVisualBreak.is-visible{
  opacity:1;
}

#mahedVisualBreak::before{
  content:"";
  position:absolute;
  inset:-8% 0;
  z-index:-2;

  background:
    linear-gradient(
      180deg,
      rgba(18,15,12,.18) 0%,
      rgba(18,15,12,.05) 38%,
      rgba(18,15,12,.22) 72%,
      rgba(18,15,12,.58) 100%
    ),
    var(--visual-break-image, url('/assets/mahed-visual-break.jpg')) center center / cover no-repeat;

  transform:scale(1.05);
  will-change:transform;
}

#mahedVisualBreak::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(
    180deg,
    rgba(255,255,255,.04),
    transparent 25%,
    transparent 70%,
    rgba(0,0,0,.14)
  );
  pointer-events:none;
}

#mahedVisualBreak .mahed-visual-break-content{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;

  padding:40px 24px;

  color:#fff;
  z-index:2;
}

#mahedVisualBreak .mahed-visual-break-content span{
  margin-bottom:20px;
}

#mahedVisualBreak .mahed-visual-break-content h2{
  max-width:850px;
}

#mahedVisualBreak .mahed-visual-break-content p{
  max-width:680px;
}

/* فضای قبل و بعد از تصویر */
#mahedVisualBreak + .section{
  padding-top:120px;
}

@media(max-width:680px){
  #mahedVisualBreak{
    height:100vh;
    min-height:680px;
  }

  #mahedVisualBreak::before{
    inset:-5% -18%;
    background-size:auto 115%;
    background-position:center center;
  }

  #mahedVisualBreak .mahed-visual-break-content{
    padding:30px 20px;
  }
}

#mahedVisualBreak::before{
  transform:
    scale(var(--mahed-photo-scale,1.05))
    translateY(var(--mahed-photo-y,0%));
}

/* =========================================
   MAHED PHOTO — OVERLAPPING WHITE PANELS
   ========================================= */

#mahedVisualBreak{
  position:relative;
  z-index:5;
  overflow:hidden;
  isolation:isolate;

  /* کمی فضای بیشتر برای دیده شدن عکس */
  margin-top:-90px;
  margin-bottom:-90px;
}

/* لایه سفید بالای عکس */
#mahedVisualBreak::after{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:150px;

  background:var(--bg);
  z-index:10;

  transform:translateY(
    calc(var(--mahed-panel-shift, 0px) * -1)
  );

  transition:transform .08s linear;
  pointer-events:none;
}

/* لایه سفید پایین عکس */
#mahedVisualBreak .mahed-visual-break-content::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:150px;

  background:var(--bg);

  transform:translateY(
    var(--mahed-panel-shift, 0px)
  );

  transition:transform .08s linear;
  pointer-events:none;
}

/* محتوای اصلی روی عکس کمی بالاتر از لایه‌ها بماند */
#mahedVisualBreak .mahed-visual-break-content{
  z-index:20;
}

/* روی موبایل کمی کمتر */
@media(max-width:680px){
  #mahedVisualBreak{
    margin-top:-55px;
    margin-bottom:-55px;
  }

  #mahedVisualBreak::after{
    height:90px;
  }

  #mahedVisualBreak .mahed-visual-break-content::after{
    height:90px;
  }
}

/* ===== FINAL PHOTO OVERLAP FIX ===== */

#mahedVisualBreak{
  position:relative;
  overflow:visible !important;
  z-index:5;
}

#mahedVisualBreak .mahed-photo-panel{
  position:absolute;
  left:0;
  width:100%;
  height:210px;
  z-index:30;
  pointer-events:none;
  background:var(--bg);
  will-change:transform;
}

#mahedVisualBreak .mahed-photo-panel-top{
  top:-105px;
  transform:translateY(var(--mahed-top-panel,0px));
}

#mahedVisualBreak .mahed-photo-panel-bottom{
  bottom:-105px;
  transform:translateY(var(--mahed-bottom-panel,0px));
}

#mahedVisualBreak .mahed-visual-break-content{
  z-index:40;
}

#mahedVisualBreak::after{
  content:none !important;
}

#mahedVisualBreak .mahed-visual-break-content::after{
  content:none !important;
}

@media(max-width:680px){
  #mahedVisualBreak .mahed-photo-panel{
    height:150px;
  }

  #mahedVisualBreak .mahed-photo-panel-top{
    top:-75px;
  }

  #mahedVisualBreak .mahed-photo-panel-bottom{
    bottom:-75px;
  }
}

/* ===== FIX TOP PHOTO PANEL ===== */

#mahedVisualBreak .mahed-photo-panel-top{
  top:-105px;
  transform:translateY(var(--mahed-top-panel,0px));
  z-index:30;
}

/* پنل بالایی فقط به سمت بالا حرکت می‌کند */
#mahedVisualBreak .mahed-photo-panel-top{
  will-change:transform;
}

/* اجازه نمی‌دهیم پنل وارد سکشن فروشگاه شود */
#books{
  position:relative;
  z-index:50;
}

#books .container,
#books .grid,
#books .sec-head{
  position:relative;
  z-index:51;
}

/* ===== DEEPER PHOTO ANGLE ===== */

#mahedVisualBreak::before{
  background-position:center center;
  background-size:cover;
  transform:
    scale(var(--mahed-photo-scale,1.10))
    translate3d(0,var(--mahed-photo-y,0%),0);
  will-change:transform;
}

/* ===== PHOTO PARALLAX GAP FIX ===== */

#mahedVisualBreak::before{
  top:-18%;
  bottom:-18%;
  left:-4%;
  right:-4%;

  background-repeat:no-repeat;
  background-position:center center;
  background-size:cover;

  transform:
    scale(var(--mahed-photo-scale,1.10))
    translate3d(0,var(--mahed-photo-y,0%),0);

  will-change:transform;
  background-color:#000;
}

#mahedVisualBreak{
  background:#000 !important;
}

/* ===== FINAL PHOTO MOTION FIX ===== */

#mahedVisualBreak{
  background:transparent !important;
}

#mahedVisualBreak::before{
  top:0;
  right:0;
  bottom:0;
  left:0;

  background:
    linear-gradient(
      180deg,
      rgba(18,15,12,.18),
      rgba(18,15,12,.05) 38%,
      rgba(18,15,12,.22) 72%,
      rgba(18,15,12,.58)
    ),
    var(--visual-break-image, url('/assets/mahed-visual-break.jpg'));

  background-repeat:no-repeat;
  background-size:cover;
  background-position:center var(--mahed-photo-position,50%);
  transform:none !important;
  scale:1.03;
  will-change:background-position;
}

/* لایه بالا فقط در ناحیه عکس */
#mahedVisualBreak .mahed-photo-panel-top{
  top:-105px;
  transform:translateY(var(--mahed-top-panel,0px));
  z-index:30;
}

/* لایه پایین پشت سکشن اساتید */
#mahedVisualBreak .mahed-photo-panel-bottom{
  bottom:-105px;
  transform:translateY(var(--mahed-bottom-panel,0px));
  z-index:30;
}

#teachers{
  position:relative;
  z-index:60;
}

/* خود محتوای اساتید همیشه روی لایه سفید باشد */
#teachers .container,
#teachers .grid,
#teachers .sec-head{
  position:relative;
  z-index:61;
}

/* ===== DEEPER PHOTO RANGE ===== */

#mahedVisualBreak{
  background:transparent !important;
}

#mahedVisualBreak::before{
  top:0;
  right:0;
  bottom:0;
  left:0;

  background:
    linear-gradient(
      180deg,
      rgba(18,15,12,.16),
      rgba(18,15,12,.04) 38%,
      rgba(18,15,12,.20) 72%,
      rgba(18,15,12,.54)
    ),
    var(--visual-break-image, url('/assets/mahed-visual-break.jpg'));

  background-repeat:no-repeat;

  /*
   * تصویر عمداً بزرگ‌تر از کادر است
   * تا با اسکرول زوایای بیشتری دیده شود.
   */
  background-size:auto 145%;
  background-position:center var(--mahed-photo-position,50%);

  transform:none !important;
  scale:1;
  will-change:background-position;
}

@media(max-width:680px){
  #mahedVisualBreak::before{
    background-size:auto 135%;
  }
}


/* =========================================================
   MAHED — LingoPhoenix-inspired Teacher / Course Catalog
   ========================================================= */

#teachers .sec-head{
  max-width:900px;
  margin-inline:auto;
  text-align:center;
}

#teachers .sec-head .sec-title{
  font-size:clamp(32px,4vw,48px);
}

#teachers .sec-head .sec-sub{
  font-size:16px;
}

#teachersGrid{
  display:flex;
  flex-direction:column;
  gap:46px;
}

.mahed-teacher-profile{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:30px;
  padding:30px;
  box-shadow:0 20px 55px rgba(58,61,65,.07);
}

.mahed-teacher-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:20px;
  padding-bottom:26px;
  margin-bottom:26px;
  border-bottom:1px solid var(--line);
}

.mahed-teacher-head img,
.mahed-teacher-avatar{
  width:92px;
  height:92px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid var(--gold);
  box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.mahed-teacher-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--navy),var(--navy2));
  color:#fff;
  font-size:34px;
  font-weight:900;
}

.mahed-teacher-head span{
  color:var(--gold);
  font-size:12px;
  font-weight:900;
  letter-spacing:.4px;
}

.mahed-teacher-head h3{
  margin:3px 0 5px;
  font-size:25px;
  font-weight:900;
  color:var(--ink);
}

.mahed-teacher-head p{
  margin:7px 0 0;
  color:var(--muted);
  line-height:1.9;
  font-size:13px;
}

.mahed-teacher-level{
  display:inline-flex;
  padding:4px 11px;
  border-radius:30px;
  background:var(--soft);
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}

.mahed-teacher-count{
  min-width:82px;
  text-align:center;
  padding:15px 12px;
  border-radius:20px;
  background:var(--soft);
}

.mahed-teacher-count strong{
  display:block;
  font-size:26px;
  color:var(--gold);
  font-weight:900;
}

.mahed-teacher-count small{
  display:block;
  color:var(--muted);
  margin-top:2px;
}

.mahed-teacher-courses{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
}

.mahed-teacher-course{
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:24px;
  padding:22px;
  transition:.35s var(--mahed-motion-ease);
}

.mahed-teacher-course:hover{
  transform:translateY(-6px);
  box-shadow:0 22px 50px rgba(58,61,65,.10);
}

.mahed-course-top{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:start;
  gap:16px;
}

.mahed-course-top h3{
  margin:5px 0 5px;
  font-size:20px;
  line-height:1.5;
  color:var(--ink);
}

.mahed-course-top p{
  margin:0;
  color:var(--muted);
  line-height:1.8;
  font-size:13px;
}

.mahed-course-level{
  color:var(--gold);
  font-size:11px;
  font-weight:900;
}

.mahed-course-top img,
.mahed-course-icon{
  width:78px;
  height:78px;
  border-radius:18px;
  object-fit:cover;
  background:var(--soft);
}

.mahed-course-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:30px;
}

.mahed-course-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:18px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}

.mahed-course-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:30px;
  padding:6px 10px;
  font-weight:800;
}

.mahed-course-status i{
  width:7px;
  height:7px;
  border-radius:50%;
  display:inline-block;
  background:currentColor;
}

.mahed-course-status.is-open{
  color:#198754;
  background:rgba(25,135,84,.10);
}

.mahed-course-status.is-running{
  color:#1976d2;
  background:rgba(25,118,210,.10);
}

.mahed-course-status.is-full{
  color:#d97706;
  background:rgba(217,119,6,.10);
}

.mahed-course-status.is-ended{
  color:#8b5cf6;
  background:rgba(139,92,246,.10);
}

.mahed-course-schedule{
  margin-top:16px;
  padding:13px 15px;
  border-radius:16px;
  background:var(--card);
  border:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  line-height:2;
}

.mahed-course-schedule b{
  color:var(--ink);
}

.mahed-course-dates{
  margin-top:12px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.mahed-course-bottom{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:15px;
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

.mahed-course-price s{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-bottom:3px;
}

.mahed-course-price strong{
  color:var(--green);
  font-size:18px;
  font-weight:900;
}

.mahed-course-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

[data-theme="dark"] .mahed-teacher-profile,
[data-theme="dark"] .mahed-teacher-course,
[data-theme="dark"] .mahed-course-schedule{
  box-shadow:none;
}

@media(max-width:860px){
  .mahed-teacher-courses{
    grid-template-columns:1fr;
  }
}

@media(max-width:680px){
  #teachersGrid{
    gap:30px;
  }

  .mahed-teacher-profile{
    padding:20px;
    border-radius:24px;
  }

  .mahed-teacher-head{
    grid-template-columns:auto 1fr;
  }

  .mahed-teacher-count{
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    gap:8px;
    justify-content:center;
  }

  .mahed-teacher-count strong,
  .mahed-teacher-count small{
    display:inline;
  }

  .mahed-teacher-head img,
  .mahed-teacher-avatar{
    width:72px;
    height:72px;
  }

  .mahed-teacher-head h3{
    font-size:21px;
  }

  .mahed-course-top{
    grid-template-columns:1fr;
  }

  .mahed-course-top img,
  .mahed-course-icon{
    width:100%;
    height:160px;
  }

  .mahed-course-bottom{
    flex-direction:column;
    align-items:stretch;
  }

  .mahed-course-actions{
    justify-content:stretch;
  }

  .mahed-course-actions .btn{
    flex:1;
  }
}

/* =========================================================
   MAHED — LINGOPHOENIX STYLE TEACHER / COURSE SECTION
   ========================================================= */

#teachers{
  padding-top:125px !important;
  padding-bottom:135px !important;
  background:#fff;
}

#teachers .sec-head{
  max-width:1180px;
  margin:0 auto 48px;
  padding:0 22px;
}

#teachers .sec-kicker{
  font-size:12px;
  letter-spacing:2px;
  font-weight:900;
  color:#ff6a00;
  margin-bottom:9px;
}

#teachers .sec-title{
  font-size:42px;
  line-height:1.25;
  margin:0;
  color:#242525;
}

#teachers .sec-sub{
  margin-top:12px;
  max-width:700px;
  line-height:2;
}

/* Teacher profile */
#teachersGrid{
  max-width:1180px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:70px;
}

/* teacher block */
.mahed-teacher-profile{
  position:relative;
  background:#fff;
  border:1px solid #e8e8e8;
  border-radius:30px;
  padding:34px;
  box-shadow:0 18px 55px rgba(36,37,37,.065);
}

/* header */
.mahed-teacher-head{
  display:grid;
  grid-template-columns:100px minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  padding-bottom:30px;
  border-bottom:1px solid #ececec;
}

.mahed-teacher-head > img,
.mahed-teacher-avatar{
  width:100px;
  height:100px;
  border-radius:28px;
  object-fit:cover;
  background:#f3f3f3;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  font-weight:900;
  color:#ff6a00;
  border:1px solid #e8e8e8;
}

.mahed-teacher-head span{
  display:block;
  font-size:11px;
  letter-spacing:1.7px;
  font-weight:900;
  color:#8a8f94;
  margin-bottom:4px;
  text-transform:uppercase;
}

.mahed-teacher-head h3{
  font-size:29px;
  line-height:1.3;
  color:#242525;
  margin:0 0 5px;
  font-weight:900;
}

.mahed-teacher-head p{
  margin:8px 0 0;
  color:#777c81;
  font-size:14px;
  line-height:1.9;
}

.mahed-teacher-level{
  display:inline-flex;
  padding:5px 11px;
  border-radius:999px;
  background:#f7f7f7;
  border:1px solid #e7e7e7;
  color:#555b61;
  font-size:11px;
  font-weight:800;
}

.mahed-teacher-count{
  min-width:92px;
  text-align:center;
  padding:15px 16px;
  border-radius:20px;
  background:#fff8f3;
  border:1px solid #ffe0cc;
}

.mahed-teacher-count strong{
  display:block;
  color:#ff6a00;
  font-size:30px;
  line-height:1;
  font-weight:900;
}

.mahed-teacher-count small{
  display:block;
  margin-top:7px;
  color:#7d8388;
  font-size:11px;
  font-weight:800;
}

/* course list */
.mahed-teacher-courses{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
  margin-top:28px;
}

.mahed-teacher-course{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:22px;
  padding:24px;
  min-height:305px;
  display:flex;
  flex-direction:column;
  box-shadow:0 9px 26px rgba(36,37,37,.045);
  transition:
    transform .35s ease,
    box-shadow .35s ease,
    border-color .35s ease;
}

.mahed-teacher-course:hover{
  transform:translateY(-8px);
  box-shadow:0 22px 48px rgba(36,37,37,.1);
  border-color:#d9d9d9;
}

/* course title area */
.mahed-course-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 74px;
  gap:18px;
  align-items:start;
}

.mahed-course-top img,
.mahed-course-icon{
  width:74px;
  height:74px;
  border-radius:18px;
  object-fit:cover;
  background:#f6f6f6;
  border:1px solid #e8e8e8;
}

.mahed-course-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:27px;
}

.mahed-course-level{
  display:inline-block;
  margin-bottom:8px;
  font-size:10px;
  letter-spacing:1.1px;
  font-weight:900;
  color:#8a8f94;
  text-transform:uppercase;
}

.mahed-course-top h3{
  margin:0;
  color:#242525;
  font-size:21px;
  line-height:1.45;
  font-weight:900;
}

.mahed-course-top p{
  margin:8px 0 0;
  color:#85898e;
  font-size:13px;
  line-height:1.8;
}

/* course meta */
.mahed-course-meta{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:19px;
}

.mahed-course-meta > span:first-child{
  color:#777c81;
  font-size:11px;
  font-weight:800;
  padding:6px 10px;
  border-radius:999px;
  background:#f7f7f7;
  border:1px solid #e7e7e7;
}

.mahed-course-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  border:1px solid transparent;
}

.mahed-course-status i{
  width:7px;
  height:7px;
  border-radius:50%;
  display:block;
  background:currentColor;
}

/* schedule */
.mahed-course-schedule{
  display:flex;
  flex-wrap:wrap;
  gap:7px 14px;
  margin-top:17px;
  color:#555b61;
  font-size:12px;
  line-height:1.9;
}

.mahed-course-schedule > *{
  padding:6px 10px;
  border-radius:10px;
  background:#fafafa;
}

/* dates */
.mahed-course-dates{
  margin-top:11px;
  color:#8a8f94;
  font-size:11px;
  font-weight:700;
}

/* bottom */
.mahed-course-bottom{
  margin-top:auto;
  padding-top:22px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  border-top:1px solid #eeeeee;
}

.mahed-course-price strong{
  display:block;
  color:#242525;
  font-size:19px;
  font-weight:900;
  white-space:nowrap;
}

.mahed-course-price s{
  display:block;
  color:#a0a4a8;
  font-size:11px;
  margin-bottom:2px;
}

.mahed-course-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mahed-course-actions .btn{
  min-height:39px;
  border-radius:10px;
  padding:0 13px;
  font-size:11px;
}

/* Bigger, cleaner buttons */
#teachers .btn-navy{
  background:#242525;
}

#teachers .btn-gold{
  background:#ff6a00;
}

/* status states */
.mahed-course-status.is-full{
  color:#b55d00;
  background:#fff7ed;
  border-color:#ffd9b5;
}

.mahed-course-status.is-available{
  color:#137a42;
  background:#effbf4;
  border-color:#c9eed8;
}

.mahed-course-status.is-live{
  color:#b42318;
  background:#fff1f0;
  border-color:#ffd0cb;
}

.mahed-course-status.is-ended{
  color:#7c8287;
  background:#f5f5f5;
  border-color:#e5e5e5;
}

/* stagger spaces */
#teachersGrid .mahed-teacher-profile:nth-child(even){
  transform:translateY(18px);
}

/* dark mode */
[data-theme="dark"] #teachers{
  background:var(--bg);
}

[data-theme="dark"] .mahed-teacher-profile,
[data-theme="dark"] .mahed-teacher-course{
  background:var(--card);
  border-color:var(--line);
}

[data-theme="dark"] .mahed-teacher-head{
  border-color:var(--line);
}

[data-theme="dark"] .mahed-teacher-head h3,
[data-theme="dark"] .mahed-course-top h3,
[data-theme="dark"] .mahed-course-price strong{
  color:#fff;
}

[data-theme="dark"] .mahed-course-bottom{
  border-color:var(--line);
}

[data-theme="dark"] .mahed-course-meta > span:first-child,
[data-theme="dark"] .mahed-course-schedule > *{
  background:#26282a;
  border-color:#36393c;
}

/* responsive */
@media(max-width:900px){

  #teachers .sec-title{
    font-size:34px;
  }

  .mahed-teacher-courses{
    grid-template-columns:1fr;
  }

}

@media(max-width:680px){

  #teachers{
    padding-top:88px !important;
    padding-bottom:92px !important;
  }

  #teachersGrid{
    gap:45px;
  }

  .mahed-teacher-profile{
    padding:20px;
    border-radius:24px;
  }

  .mahed-teacher-head{
    grid-template-columns:72px minmax(0,1fr);
    gap:15px;
  }

  .mahed-teacher-head > img,
  .mahed-teacher-avatar{
    width:72px;
    height:72px;
    border-radius:20px;
    font-size:26px;
  }

  .mahed-teacher-head h3{
    font-size:22px;
  }

  .mahed-teacher-head p{
    font-size:12px;
  }

  .mahed-teacher-count{
    grid-column:1 / -1;
    width:max-content;
    min-width:82px;
  }

  .mahed-teacher-course{
    padding:19px;
    min-height:0;
    border-radius:19px;
  }

  .mahed-course-top h3{
    font-size:18px;
  }

  .mahed-course-bottom{
    align-items:stretch;
    flex-direction:column;
  }

  .mahed-course-actions{
    justify-content:stretch;
  }

  .mahed-course-actions .btn{
    flex:1;
  }

  #teachersGrid .mahed-teacher-profile:nth-child(even){
    transform:none;
  }

}

/* =========================================================
   MAHED — PROFESSIONAL TEACHER / COURSE CATALOG
   ========================================================= */

#teachers{
  padding-top:120px !important;
  padding-bottom:135px !important;
}

#teachers .sec-head{
  margin-bottom:48px !important;
}

#teachers .sec-kicker{
  font-size:12px;
  letter-spacing:2px;
  color:var(--gold);
  font-weight:900;
}

#teachers .sec-title{
  font-size:clamp(34px,4vw,48px);
  line-height:1.25;
  margin-top:8px;
}

#teachers .mahed-teacher-profile{
  position:relative;
  margin-bottom:42px;
  padding:34px;
  background:rgba(255,255,255,.82);
  border:1px solid #e7e8ea;
  border-radius:28px;
  box-shadow:0 20px 60px rgba(25,35,45,.07);
  overflow:hidden;
}

#teachers .mahed-teacher-profile::before{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:220px;
  height:220px;
  background:radial-gradient(
    circle,
    rgba(255,106,0,.10),
    transparent 68%
  );
  pointer-events:none;
}

#teachers .mahed-teacher-head{
  position:relative;
  display:grid;
  grid-template-columns:88px minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  padding-bottom:30px;
  margin-bottom:30px;
  border-bottom:1px solid #eceef0;
}

#teachers .mahed-teacher-head img,
#teachers .mahed-teacher-avatar{
  width:88px;
  height:88px;
  border-radius:24px;
  object-fit:cover;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    linear-gradient(135deg,#162437,#30445f);
  color:#fff;
  font-size:30px;
  font-weight:900;
  box-shadow:0 14px 32px rgba(21,34,53,.18);
}

#teachers .mahed-teacher-head > div:nth-child(2){
  min-width:0;
}

#teachers .mahed-teacher-head > div:nth-child(2) > span{
  display:inline-block;
  margin-bottom:5px;
  color:var(--gold);
  font-size:11px;
  font-weight:900;
  letter-spacing:.8px;
}

#teachers .mahed-teacher-head h3{
  margin:0;
  font-size:25px;
  line-height:1.4;
  color:#242525;
  font-weight:900;
}

#teachers .mahed-teacher-level{
  display:inline-flex;
  margin-top:7px;
  padding:5px 11px;
  border-radius:999px;
  background:#f4f5f6;
  border:1px solid #e3e5e7;
  color:#555b62;
  font-size:11px;
  font-weight:800;
}

#teachers .mahed-teacher-head p{
  margin:9px 0 0;
  max-width:760px;
  color:#7a8087;
  font-size:13px;
  line-height:1.9;
}

#teachers .mahed-teacher-count{
  min-width:92px;
  padding:14px 16px;
  text-align:center;
  border-radius:18px;
  background:#fafafa;
  border:1px solid #e7e8ea;
}

#teachers .mahed-teacher-count strong{
  display:block;
  color:#242525;
  font-size:28px;
  line-height:1;
}

#teachers .mahed-teacher-count small{
  display:block;
  margin-top:6px;
  color:#858b91;
  font-size:11px;
}

/* Course list */

#teachers .mahed-teacher-courses{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}

#teachers .mahed-teacher-course{
  position:relative;
  min-width:0;
  padding:24px;
  background:#fff;
  border:1px solid #e5e7e9;
  border-radius:22px;
  box-shadow:0 8px 28px rgba(25,35,45,.045);
  transition:
    transform .35s var(--mahed-motion-ease),
    box-shadow .35s var(--mahed-motion-ease),
    border-color .35s ease;
}

#teachers .mahed-teacher-course:hover{
  transform:translateY(-6px);
  border-color:#d8dade;
  box-shadow:0 20px 44px rgba(25,35,45,.10);
}

#teachers .mahed-course-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 74px;
  gap:18px;
  align-items:start;
}

#teachers .mahed-course-top img{
  width:74px;
  height:74px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid #e5e7e9;
}

#teachers .mahed-course-icon{
  width:74px;
  height:74px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(
    145deg,
    #162437,
    #344b68
  );
  color:#fff;
  font-size:28px;
  box-shadow:0 10px 22px rgba(21,34,53,.15);
}

#teachers .mahed-course-level{
  display:inline-flex;
  padding:5px 10px;
  border-radius:999px;
  background:#fff5ec;
  color:#e85f00;
  font-size:10px;
  font-weight:900;
  margin-bottom:8px;
}

#teachers .mahed-course-top h3{
  margin:0;
  color:#282b2f;
  font-size:18px;
  line-height:1.55;
  font-weight:900;
}

#teachers .mahed-course-top p{
  margin:6px 0 0;
  color:#888f96;
  font-size:12px;
  line-height:1.8;
}

#teachers .mahed-course-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px dashed #e5e7e9;
}

#teachers .mahed-course-meta > span:first-child{
  color:#858b91;
  font-size:11px;
  font-weight:700;
}

#teachers .mahed-course-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
}

#teachers .mahed-course-status i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
}

#teachers .mahed-course-status.is-open{
  color:#198754;
  background:#eaf8ef;
}

#teachers .mahed-course-status.is-full{
  color:#cc6b00;
  background:#fff4df;
}

#teachers .mahed-course-status.is-live{
  color:#c62828;
  background:#fff0f0;
}

#teachers .mahed-course-schedule{
  margin-top:17px;
  padding:13px 15px;
  border-radius:15px;
  background:#f8f9fa;
  border:1px solid #eceef0;
}

#teachers .mahed-course-schedule > div{
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:4px 0;
  color:#626970;
  font-size:12px;
  line-height:1.8;
}

#teachers .mahed-course-schedule b{
  color:#272b2f;
  font-weight:900;
}

#teachers .mahed-course-dates{
  margin-top:12px;
  color:#8a9096;
  font-size:11px;
  line-height:1.8;
}

#teachers .mahed-course-bottom{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:15px;
  margin-top:20px;
  padding-top:17px;
  border-top:1px solid #eef0f1;
}

#teachers .mahed-course-price s{
  display:block;
  margin-bottom:3px;
  color:#9da2a7;
  font-size:11px;
}

#teachers .mahed-course-price strong{
  color:#16804d;
  font-size:19px;
  font-weight:900;
  white-space:nowrap;
}

#teachers .mahed-course-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
}

#teachers .mahed-course-actions .btn{
  min-height:39px;
  border-radius:11px;
  padding:8px 13px;
  font-size:11px;
}

/* dark */
[data-theme="dark"] #teachers .mahed-teacher-profile,
[data-theme="dark"] #teachers .mahed-teacher-course{
  background:var(--card);
  border-color:var(--line);
}

[data-theme="dark"] #teachers .mahed-teacher-head{
  border-bottom-color:var(--line);
}

[data-theme="dark"] #teachers .mahed-teacher-head h3,
[data-theme="dark"] #teachers .mahed-course-top h3,
[data-theme="dark"] #teachers .mahed-teacher-count strong{
  color:#fff;
}

[data-theme="dark"] #teachers .mahed-teacher-level,
[data-theme="dark"] #teachers .mahed-teacher-count,
[data-theme="dark"] #teachers .mahed-course-schedule{
  background:#242628;
  border-color:var(--line);
}

[data-theme="dark"] #teachers .mahed-course-meta,
[data-theme="dark"] #teachers .mahed-course-bottom{
  border-color:var(--line);
}

/* responsive */
@media(max-width:900px){
  #teachers .mahed-teacher-courses{
    grid-template-columns:1fr;
  }

  #teachers .mahed-teacher-head{
    grid-template-columns:76px minmax(0,1fr);
  }

  #teachers .mahed-teacher-count{
    grid-column:1 / -1;
    width:max-content;
    min-width:90px;
  }
}

@media(max-width:680px){
  #teachers{
    padding-top:80px !important;
    padding-bottom:90px !important;
  }

  #teachers .mahed-teacher-profile{
    padding:20px;
    border-radius:22px;
    margin-bottom:26px;
  }

  #teachers .mahed-teacher-head{
    grid-template-columns:64px minmax(0,1fr);
    gap:14px;
    padding-bottom:22px;
    margin-bottom:22px;
  }

  #teachers .mahed-teacher-head img,
  #teachers .mahed-teacher-avatar{
    width:64px;
    height:64px;
    border-radius:18px;
    font-size:22px;
  }

  #teachers .mahed-teacher-head h3{
    font-size:20px;
  }

  #teachers .mahed-teacher-head p{
    font-size:12px;
  }

  #teachers .mahed-teacher-count{
    grid-column:1 / -1;
  }

  #teachers .mahed-teacher-course{
    padding:18px;
    border-radius:19px;
  }

  #teachers .mahed-course-top{
    grid-template-columns:minmax(0,1fr) 60px;
  }

  #teachers .mahed-course-top img,
  #teachers .mahed-course-icon{
    width:60px;
    height:60px;
    border-radius:15px;
  }

  #teachers .mahed-course-top h3{
    font-size:16px;
  }

  #teachers .mahed-course-bottom{
    flex-direction:column;
    align-items:stretch;
  }

  #teachers .mahed-course-actions{
    justify-content:stretch;
  }

  #teachers .mahed-course-actions .btn{
    flex:1;
  }
}

/* =========================================================
   MAHED TEACHERS — Premium Course Catalog Upgrade
   Safe override: Home / Teachers only
   ========================================================= */

#teachers .mahed-teacher-profile{
  padding:38px;
  margin-bottom:52px;
  border-radius:32px;
  border:1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background:
    radial-gradient(circle at 95% 5%, rgba(211,158,74,.11), transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,249,250,.92));
  box-shadow:
    0 28px 80px rgba(20,31,45,.09),
    inset 0 1px 0 rgba(255,255,255,.9);
  isolation:isolate;
}

#teachers .mahed-teacher-profile::before{
  width:320px;
  height:320px;
  top:-120px;
  right:-100px;
  background:radial-gradient(circle,rgba(213,164,86,.13),transparent 68%);
}

#teachers .mahed-teacher-head{
  grid-template-columns:104px minmax(0,1fr) auto;
  gap:24px;
  padding-bottom:34px;
  margin-bottom:34px;
  border-bottom:1px solid rgba(120,130,140,.16);
}

#teachers .mahed-teacher-head img,
#teachers .mahed-teacher-avatar{
  width:104px;
  height:104px;
  border-radius:28px;
  border:4px solid rgba(255,255,255,.92);
  box-shadow:
    0 18px 42px rgba(20,31,45,.16),
    0 0 0 1px rgba(21,34,53,.06);
}

#teachers .mahed-teacher-head > div:nth-child(2) > span{
  margin-bottom:8px;
  font-size:10px;
  letter-spacing:1.4px;
  text-transform:uppercase;
}

#teachers .mahed-teacher-head h3{
  font-size:29px;
  letter-spacing:-.3px;
}

#teachers .mahed-teacher-level{
  margin-top:10px;
  padding:6px 12px;
  background:rgba(255,255,255,.75);
  border-color:rgba(120,130,140,.16);
}

#teachers .mahed-teacher-head p{
  max-width:820px;
  margin-top:11px;
  font-size:13px;
}

#teachers .mahed-teacher-count{
  min-width:116px;
  padding:18px 20px;
  border-radius:22px;
  background:rgba(255,255,255,.72);
  border-color:rgba(120,130,140,.14);
  box-shadow:0 10px 24px rgba(20,31,45,.05);
}

#teachers .mahed-teacher-count strong{
  font-size:34px;
}

#teachers .mahed-teacher-count small{
  margin-top:8px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.6px;
}

/* Course catalog grid */
#teachers .mahed-teacher-courses{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}

#teachers .mahed-teacher-course{
  padding:26px;
  border-radius:24px;
  border:1px solid rgba(120,130,140,.14);
  background:rgba(255,255,255,.9);
  box-shadow:
    0 12px 35px rgba(20,31,45,.055),
    inset 0 1px 0 rgba(255,255,255,.9);
  overflow:hidden;
}

#teachers .mahed-teacher-course::before{
  content:"";
  position:absolute;
  top:0;
  right:0;
  left:0;
  height:3px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(211,158,74,.72),
    transparent
  );
  opacity:.55;
}

#teachers .mahed-teacher-course:hover{
  transform:translateY(-8px);
  border-color:rgba(211,158,74,.30);
  box-shadow:
    0 24px 52px rgba(20,31,45,.11),
    0 0 0 1px rgba(211,158,74,.06);
}

/* Course identity */
#teachers .mahed-course-top{
  grid-template-columns:minmax(0,1fr) 92px;
  gap:20px;
}

#teachers .mahed-course-top img,
#teachers .mahed-course-icon{
  width:92px;
  height:92px;
  border-radius:22px;
}

#teachers .mahed-course-top img{
  border:1px solid rgba(120,130,140,.14);
  box-shadow:0 12px 26px rgba(20,31,45,.08);
}

#teachers .mahed-course-icon{
  font-size:31px;
}

#teachers .mahed-course-level{
  margin-bottom:10px;
  padding:6px 11px;
  font-size:9px;
  letter-spacing:.3px;
}

#teachers .mahed-course-top h3{
  font-size:20px;
  line-height:1.5;
  letter-spacing:-.2px;
}

#teachers .mahed-course-top p{
  margin-top:8px;
  font-size:12px;
}

/* Meta/status */
#teachers .mahed-course-meta{
  margin-top:21px;
  padding-top:17px;
}

#teachers .mahed-course-meta > span:first-child{
  font-size:10px;
  letter-spacing:.2px;
}

#teachers .mahed-course-status{
  padding:7px 11px;
  font-size:9px;
  letter-spacing:.15px;
}

/* Schedule */
#teachers .mahed-course-schedule{
  margin-top:18px;
  padding:14px 16px;
  border-radius:17px;
  background:rgba(246,248,249,.9);
}

#teachers .mahed-course-schedule > div{
  font-size:11px;
}

#teachers .mahed-course-dates{
  margin-top:13px;
  padding-right:2px;
  font-size:10px;
}

/* Price / actions */
#teachers .mahed-course-bottom{
  align-items:flex-end;
  margin-top:21px;
  padding-top:18px;
}

#teachers .mahed-course-price s{
  font-size:10px;
}

#teachers .mahed-course-price strong{
  font-size:20px;
}

#teachers .mahed-course-actions{
  gap:8px;
}

#teachers .mahed-course-actions .btn{
  min-height:41px;
  border-radius:12px;
  padding:9px 14px;
  font-size:10px;
  font-weight:800;
}

/* Status variants — match actual JS classes */
#teachers .mahed-course-status.is-open{
  color:#18794e;
  background:#e9f7ef;
}

#teachers .mahed-course-status.is-full{
  color:#b86a00;
  background:#fff2d9;
}

#teachers .mahed-course-status.is-running{
  color:#b42318;
  background:#ffefed;
}

#teachers .mahed-course-status.is-ended{
  color:#6b7280;
  background:#eef0f2;
}

/* Dark mode */
[data-theme="dark"] #teachers .mahed-teacher-profile{
  background:
    radial-gradient(circle at 95% 5%, rgba(211,158,74,.10), transparent 24%),
    linear-gradient(145deg,#191c1f,#151719);
  box-shadow:
    0 28px 80px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.025);
}

[data-theme="dark"] #teachers .mahed-teacher-course{
  background:linear-gradient(145deg,#1c1f22,#181a1c);
  border-color:rgba(255,255,255,.07);
  box-shadow:
    0 16px 40px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.025);
}

[data-theme="dark"] #teachers .mahed-teacher-head{
  border-bottom-color:rgba(255,255,255,.08);
}

[data-theme="dark"] #teachers .mahed-teacher-level,
[data-theme="dark"] #teachers .mahed-teacher-count{
  background:#222528;
  border-color:rgba(255,255,255,.07);
}

[data-theme="dark"] #teachers .mahed-course-schedule{
  background:#202326;
  border-color:rgba(255,255,255,.07);
}

[data-theme="dark"] #teachers .mahed-course-meta,
[data-theme="dark"] #teachers .mahed-course-bottom{
  border-color:rgba(255,255,255,.08);
}

[data-theme="dark"] #teachers .mahed-course-top p,
[data-theme="dark"] #teachers .mahed-course-dates{
  color:#969da5;
}

/* Tablet */
@media(max-width:1000px){
  #teachers .mahed-teacher-profile{
    padding:30px;
  }

  #teachers .mahed-teacher-head{
    grid-template-columns:88px minmax(0,1fr) auto;
  }

  #teachers .mahed-teacher-head img,
  #teachers .mahed-teacher-avatar{
    width:88px;
    height:88px;
    border-radius:23px;
  }

  #teachers .mahed-teacher-courses{
    gap:18px;
  }

  #teachers .mahed-course-top{
    grid-template-columns:minmax(0,1fr) 76px;
  }

  #teachers .mahed-course-top img,
  #teachers .mahed-course-icon{
    width:76px;
    height:76px;
  }
}

/* Mobile */
@media(max-width:680px){
  #teachers .mahed-teacher-profile{
    padding:20px;
    border-radius:24px;
  }

  #teachers .mahed-teacher-head{
    grid-template-columns:68px minmax(0,1fr);
    gap:14px;
    padding-bottom:22px;
    margin-bottom:22px;
  }

  #teachers .mahed-teacher-head img,
  #teachers .mahed-teacher-avatar{
    width:68px;
    height:68px;
    border-radius:19px;
  }

  #teachers .mahed-teacher-head h3{
    font-size:21px;
  }

  #teachers .mahed-teacher-count{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:13px 16px;
  }

  #teachers .mahed-teacher-count strong{
    display:inline;
    font-size:25px;
  }

  #teachers .mahed-teacher-count small{
    margin-top:0;
  }

  #teachers .mahed-teacher-course{
    padding:18px;
    border-radius:20px;
  }

  #teachers .mahed-course-top{
    grid-template-columns:minmax(0,1fr) 64px;
    gap:14px;
  }

  #teachers .mahed-course-top img,
  #teachers .mahed-course-icon{
    width:64px;
    height:64px;
    border-radius:17px;
  }

  #teachers .mahed-course-top h3{
    font-size:17px;
  }

  #teachers .mahed-course-bottom{
    gap:14px;
  }
}



/* MAHED BLOG SECTION */
#blog.mahed-blog-section{position:relative;overflow:hidden}
#blog .sec-head{align-items:end}
.mahed-blog-more{display:inline-flex;align-items:center;gap:8px;color:var(--gold);font-weight:900;text-decoration:none;font-size:12px;white-space:nowrap}
.mahed-blog-more span,.mahed-blog-link span{transition:transform .25s ease;display:inline-block}
.mahed-blog-more:hover span,.mahed-blog-link:hover span{transform:translateX(-4px)}
.mahed-blog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-top:28px}
.mahed-blog-card{position:relative;min-width:0;padding:28px;border:1px solid var(--line);border-radius:24px;background:var(--card);box-shadow:0 18px 50px rgba(20,31,45,.06);transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease;overflow:hidden}
.mahed-blog-card::before{content:"";position:absolute;inset:0 auto auto 0;width:100%;height:3px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.65}
.mahed-blog-card:hover{transform:translateY(-7px);box-shadow:0 28px 60px rgba(20,31,45,.11);border-color:rgba(211,158,74,.28)}
.mahed-blog-index{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;background:rgba(211,158,74,.12);color:var(--gold);font-size:11px;font-weight:900;margin-bottom:18px}
.mahed-blog-card h3{margin:0;line-height:1.65;font-size:19px;font-weight:900}
.mahed-blog-card h3 a{color:var(--text);text-decoration:none}
.mahed-blog-card p{margin:12px 0 20px;color:var(--muted);font-size:12px;line-height:2}
.mahed-blog-link{display:inline-flex;align-items:center;gap:8px;color:var(--gold);font-size:11px;font-weight:900;text-decoration:none}
[data-theme="dark"] .mahed-blog-card{background:var(--card);border-color:var(--line);box-shadow:0 20px 50px rgba(0,0,0,.18)}
@media(max-width:700px){.mahed-blog-grid{grid-template-columns:1fr;gap:16px}.mahed-blog-card{padding:22px;border-radius:20px}.mahed-blog-card h3{font-size:17px}.mahed-blog-more{font-size:11px}}


/* MAHED BLOG IMAGE CARDS */
.mahed-blog-cover{
  width:100%;
  height:210px;
  margin:-28px -28px 22px;
  width:calc(100% + 56px);
  overflow:hidden;
  background:var(--navy);
}
.mahed-blog-cover img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .55s ease;
}
.mahed-blog-card:hover .mahed-blog-cover img{
  transform:scale(1.045);
}
@media(max-width:700px){
  .mahed-blog-cover{
    height:185px;
    margin:-22px -22px 20px;
    width:calc(100% + 44px);
  }
}

/* =========================================================
   MAHED PLACEMENT CTA + PREMIUM FOOTER
   ========================================================= */

.mahed-placement-cta{
  position:relative;
  padding:34px 0;
  background:linear-gradient(135deg,var(--navy),var(--navy2));
  overflow:hidden;
}

.mahed-placement-cta::before{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  top:-250px;
  right:-100px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(211,158,74,.20),transparent 70%);
  pointer-events:none;
}

.mahed-placement-inner{
  position:relative;
  z-index:1;
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  padding:30px 36px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:28px;
  background:rgba(255,255,255,.055);
  box-shadow:0 24px 70px rgba(0,0,0,.18);
}

.mahed-placement-kicker{
  display:block;
  margin-bottom:8px;
  color:var(--gold);
  font-size:10px;
  font-weight:900;
  letter-spacing:1.8px;
}

.mahed-placement-inner h2{
  margin:0;
  color:#fff;
  font-size:30px;
  line-height:1.45;
  font-weight:900;
}

.mahed-placement-inner p{
  margin:8px 0 0;
  color:#c5ceda;
  font-size:13px;
  line-height:1.9;
}

.mahed-placement-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:150px;
  justify-content:center;
  flex:none;
}

.mahed-placement-btn span{
  transition:transform .25s ease;
}

.mahed-placement-btn:hover span{
  transform:translateX(-4px);
}

/* Footer */
.mahed-footer{
  position:relative;
  background:#111820;
  color:#c9d1dc;
  padding:58px 0 28px;
  overflow:hidden;
}

.mahed-footer::before{
  content:"";
  position:absolute;
  top:0;
  right:8%;
  width:320px;
  height:320px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(211,158,74,.08),transparent 70%);
  pointer-events:none;
}

.mahed-footer-main{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1.45fr repeat(3,1fr);
  gap:46px;
  padding-bottom:42px;
}

.mahed-footer-brand-top{
  display:flex;
  align-items:center;
  gap:13px;
}

.mahed-footer-brand-top img{
  width:54px;
  height:54px;
  border-radius:15px;
  object-fit:cover;
}

.mahed-footer-brand-name{
  color:#fff;
  font-size:25px;
  font-weight:900;
  line-height:1.1;
}

.mahed-footer-brand-en{
  margin-top:5px;
  color:#8291a5;
  font-size:9px;
  font-weight:800;
  letter-spacing:1.3px;
}

.mahed-footer-brand > p{
  max-width:360px;
  margin:18px 0 0;
  color:#91a0b2;
  font-size:12px;
  line-height:2.1;
}







.mahed-footer-col h3{
  margin:0 0 18px;
  color:#fff;
  font-size:14px;
  font-weight:900;
}

.mahed-footer-col{
  display:flex;
  flex-direction:column;
  gap:11px;
}

.mahed-footer-col a{
  color:#91a0b2;
  font-size:12px;
  line-height:1.7;
  text-decoration:none;
  transition:.25s ease;
}

.mahed-footer-col a:hover{
  color:var(--gold);
  transform:translateX(-3px);
}

.mahed-footer-contact{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:25px;
  padding:24px 0;
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.mahed-footer-contact span{
  display:block;
  margin-bottom:5px;
  color:var(--gold);
  font-size:10px;
  font-weight:900;
}

.mahed-footer-contact strong{
  color:#d5dce5;
  font-size:12px;
  font-weight:700;
}

.mahed-footer-test-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--gold);
  font-size:11px;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}

.mahed-footer-test-link span{
  display:inline;
  margin:0;
  transition:transform .25s ease;
}

.mahed-footer-test-link:hover span{
  transform:translateX(-4px);
}

.mahed-footer-bottom{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding-top:24px;
  color:#68778a;
  font-size:10px;
}

/* Dark mode remains native */
[data-theme="dark"] .mahed-footer{
  background:#0d1013;
}

@media(max-width:900px){
  .mahed-footer-main{
    grid-template-columns:1.4fr 1fr 1fr;
  }

  .mahed-footer-brand{
    grid-column:1 / -1;
  }
}

@media(max-width:680px){
  .mahed-placement-cta{
    padding:24px 0;
  }

  .mahed-placement-inner{
    min-height:0;
    flex-direction:column;
    align-items:stretch;
    padding:24px 20px;
    border-radius:22px;
  }

  .mahed-placement-inner h2{
    font-size:23px;
  }

  .mahed-placement-inner p{
    font-size:12px;
  }

  .mahed-placement-btn{
    width:100%;
  }

  .mahed-footer{
    padding-top:42px;
  }

  .mahed-footer-main{
    grid-template-columns:1fr 1fr;
    gap:34px 22px;
  }

  .mahed-footer-brand{
    grid-column:1 / -1;
  }

  .mahed-footer-contact{
    flex-direction:column;
    align-items:flex-start;
  }

  .mahed-footer-bottom{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
}

.mahed-footer-brand-top{align-items:center;}
.mahed-footer-brand-top img{display:block!important;width:54px;height:54px;object-fit:contain;border-radius:15px;}

.mahed-footer-logo-mark{
  width:54px;
  height:54px;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--gold),#b98535);
  color:#fff;
  font-size:24px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

#logoImg2{
  display:block!important;
  width:54px;
  height:54px;
  object-fit:contain;
  border-radius:15px;
}













/* MAHED HERO — glass panel refinement */
.hero-grid > div:first-child{
  top:42px !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:rgba(255,255,255,.18) !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

[data-theme="dark"] .hero-grid > div:first-child{
  border:0 !important;
  box-shadow:none !important;
  background:rgba(20,22,24,.28) !important;
}

@media(max-width:960px){
  .hero-grid > div:first-child{
    top:55px !important;
  }
}

@media(max-width:680px){
  .hero-grid > div:first-child{
    top:30px !important;
  }
}


/* =========================================================
   MAHED HEADER — LINGO-STYLE ACADEMY NAV
   ========================================================= */

.mahed-header{
  position:relative;
  z-index:200;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}

.mahed-topbar{
  background:#151e2b;
  color:#dce4ee;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.mahed-topbar-inner{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  font-size:11px;
}

.mahed-phone{
  color:#e6edf5;
  text-decoration:none;
  white-space:nowrap;
}

.mahed-phone strong{
  color:var(--gold);
  font-weight:900;
}

.mahed-phone span{
  color:#8fa0b5;
}

.mahed-top-links{
  display:flex;
  align-items:center;
  gap:18px;
}

.mahed-top-links a{
  color:#9eacbc;
  text-decoration:none;
  font-size:10px;
  transition:.2s ease;
}

.mahed-top-links a:hover{
  color:var(--gold);
}

.mahed-header .navbar{
  min-height:88px;
  padding:13px 0;
  gap:22px;
}

.mahed-header .brand{
  min-width:205px;
}

.mahed-header .brand img{
  width:52px;
  height:52px;
  border-radius:14px;
}

.mahed-header .brand-name{
  font-size:21px;
}

.mahed-header .nav-links{
  gap:21px;
}

.mahed-header .nav-links a{
  position:relative;
  color:var(--ink);
  font-size:12px;
  font-weight:800;
  text-decoration:none;
  transition:.22s ease;
}

.mahed-header .nav-links a::after{
  content:"";
  position:absolute;
  right:0;
  bottom:-9px;
  width:0;
  height:2px;
  border-radius:3px;
  background:var(--gold);
  transition:width .25s ease;
}

.mahed-header .nav-links a:hover{
  color:var(--gold);
}

.mahed-header .nav-links a:hover::after{
  width:100%;
}

.mahed-header .nav-actions{
  min-width:auto;
  flex:none;
}

.mahed-header .nav-actions .btn{
  white-space:nowrap;
  min-height:36px;
}

[data-theme="dark"] .mahed-header{
  background:#202223;
}

[data-theme="dark"] .mahed-header .nav-links a{
  color:#f3f4f6;
}

@media(max-width:1200px){
  .mahed-header .nav-links{
    gap:13px;
  }

  .mahed-header .nav-links a{
    font-size:11px;
  }

  .mahed-header .brand{
    min-width:175px;
  }
}

@media(max-width:1050px){
  .mahed-header .nav-links a:nth-child(n+7){
    display:none;
  }
}

@media(max-width:960px){
  .mahed-topbar-inner{
    justify-content:center;
  }

  .mahed-top-links{
    display:none;
  }

  .mahed-header .navbar{
    min-height:78px;
  }

  .mahed-header .nav-links{
    display:none;
  }

  .mahed-header .nav-actions{
    margin-right:auto;
  }
}

@media(max-width:680px){
  .mahed-topbar-inner{
    min-height:32px;
    justify-content:center;
  }

  .mahed-phone{
    font-size:10px;
  }

  .mahed-header .navbar{
    min-height:74px;
    padding:10px 0;
  }

  .mahed-header .brand{
    min-width:0;
    gap:9px;
  }

  .mahed-header .brand img{
    width:44px;
    height:44px;
  }

  .mahed-header .brand-name{
    font-size:17px;
  }

  .mahed-header .brand-name small{
    font-size:8px;
  }

  .mahed-header .nav-actions{
    gap:5px;
  }

  .mahed-header .nav-actions .btn{
    min-height:34px;
    padding:7px 9px;
    font-size:10px;
  }

  .mahed-header .icon-btn,
  .mahed-header .theme-btn{
    width:34px;
    height:34px;
  }
}


/* MAHED HEADER FINAL */
.mahed-header{
  position:relative;
  z-index:200;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}

.mahed-topbar{
  background:#151e2b;
  color:#dce4ee;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.mahed-topbar-inner{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.mahed-phone{
  color:#e6edf5;
  text-decoration:none;
  font-size:11px;
  white-space:nowrap;
}

.mahed-phone strong{
  color:var(--gold);
  font-weight:900;
}

.mahed-phone span{
  color:#8fa0b5;
}

.mahed-top-links{
  display:flex;
  gap:18px;
}

.mahed-top-links a{
  color:#9eacbc;
  font-size:10px;
  text-decoration:none;
}

.mahed-top-links a:hover{
  color:var(--gold);
}

.mahed-header .navbar{
  min-height:88px;
  padding:13px 0;
  gap:20px;
}

.mahed-header .brand{
  min-width:190px;
}

.mahed-header .brand img{
  width:52px;
  height:52px;
  border-radius:14px;
}

.mahed-header .nav-links{
  gap:18px;
}

.mahed-header .nav-links a{
  color:var(--ink);
  font-size:12px;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
  transition:.2s ease;
}

.mahed-header .nav-links a:hover{
  color:var(--gold);
}

.mahed-header .nav-actions{
  min-width:auto;
  flex:none;
}

@media(max-width:1200px){
  .mahed-header .nav-links{gap:11px}
  .mahed-header .nav-links a{font-size:11px}
}

@media(max-width:1050px){
  .mahed-header .nav-links a:nth-child(n+7){display:none}
}

@media(max-width:960px){
  .mahed-topbar-inner{justify-content:center}
  .mahed-top-links{display:none}
  .mahed-header .nav-links{display:none}
  .mahed-header .nav-actions{margin-right:auto}
}

@media(max-width:680px){
  .mahed-phone{font-size:10px}
  .mahed-header .navbar{min-height:74px;padding:10px 0}
  .mahed-header .brand{min-width:0}
  .mahed-header .brand img{width:44px;height:44px}
  .mahed-header .brand-name{font-size:17px}
  .mahed-header .brand-name small{font-size:8px}
  .mahed-header .nav-actions{gap:5px}
}

/* MAHED HEADER MICRO UPDATES */
.mahed-header .brand img{
  width:62px!important;
  height:62px!important;
  border-radius:16px!important;
}

.mahed-header .brand-name{
  font-size:23px!important;
}

.mahed-header .nav-actions #authArea .btn-ghost{
  min-height:38px;
  padding:8px 14px;
  font-size:11px;
}

.mahed-register-btn{
  min-height:44px!important;
  padding:10px 18px!important;
  font-size:12px!important;
  font-weight:900!important;
  border-radius:12px!important;
  box-shadow:0 8px 22px rgba(211,158,74,.20);
}

.mahed-club-btn{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 13px;
  border-radius:10px;
  color:#fff!important;
  font-size:11px!important;
  font-weight:900!important;
  text-decoration:none!important;
  background:linear-gradient(90deg,#d4a24c,#e56b35,#9b59b6,#2979ff,#16a085,#d4a24c);
  background-size:500% 100%;
  animation:mahedClubGradient 7s linear infinite;
  box-shadow:0 6px 18px rgba(0,0,0,.10);
}

.mahed-club-btn::after{
  display:none!important;
}

@keyframes mahedClubGradient{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

.mahed-club-btn:hover{
  color:#fff!important;
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}

@media(max-width:680px){
  .mahed-header .brand img{
    width:50px!important;
    height:50px!important;
  }

  .mahed-header .brand-name{
    font-size:18px!important;
  }

  .mahed-register-btn{
    min-height:38px!important;
    padding:8px 11px!important;
    font-size:10px!important;
  }

  .mahed-club-btn{
    min-height:32px;
    padding:6px 10px;
  }
}

/* =========================================================
   MAHED ACADEMY STORY / COURSE SHOWCASE
   Inspired by premium language academy layouts
   ========================================================= */

#liveSec.mahed-academy-showcase{
  padding-top:78px!important;
  padding-bottom:95px!important;
  background:var(--bg);
  overflow:hidden;
}

.mahed-story-head{
  max-width:760px;
  margin:0 auto 34px;
  text-align:center;
}

.mahed-story-kicker{
  color:var(--gold);
  font-size:10px;
  font-weight:900;
  letter-spacing:2px;
  margin-bottom:10px;
}

.mahed-story-head h2{
  margin:0;
  color:var(--ink);
  font-size:34px;
  line-height:1.4;
  font-weight:900;
}

.mahed-story-head p{
  max-width:650px;
  margin:12px auto 0;
  color:var(--muted);
  font-size:13px;
  line-height:2.1;
}

.mahed-teacher-strip{
  min-height:145px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:0;
  margin:0 auto 58px;
  padding-top:15px;
  border-bottom:1px solid var(--line);
  overflow:hidden;
}

.mahed-teacher-mini{
  width:108px;
  height:135px;
  margin-left:-8px;
  position:relative;
  transition:transform .3s ease;
}

.mahed-teacher-mini:first-child{
  margin-left:0;
}

.mahed-teacher-mini:hover{
  transform:translateY(-8px);
  z-index:3;
}

.mahed-teacher-mini img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  display:block;
  border-radius:60px 60px 8px 8px;
  filter:saturate(.92);
  mask-image:linear-gradient(to bottom,#000 82%,transparent 100%);
}

.mahed-showcase-list{
  display:flex;
  flex-direction:column;
  gap:82px;
}

.mahed-showcase-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:center;
  gap:72px;
  max-width:1040px;
  margin:0 auto;
}

.mahed-showcase-row.is-reverse .mahed-showcase-media{
  order:2;
}

.mahed-showcase-row.is-reverse .mahed-showcase-copy{
  order:1;
}

.mahed-showcase-media{
  position:relative;
  height:300px;
  overflow:hidden;
  border-radius:26px;
  background:var(--card);
  box-shadow:0 24px 65px rgba(20,31,45,.10);
}

.mahed-showcase-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .65s ease;
}

.mahed-showcase-row:hover .mahed-showcase-media img{
  transform:scale(1.045);
}

.mahed-showcase-media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 50%,rgba(20,31,45,.25));
  pointer-events:none;
}

.mahed-showcase-label{
  position:absolute;
  top:18px;
  right:18px;
  z-index:2;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.90);
  color:#25303d;
  font-size:10px;
  font-weight:900;
  backdrop-filter:blur(8px);
}

.mahed-showcase-copy{
  position:relative;
}

.mahed-showcase-number{
  display:block;
  color:var(--gold);
  font-size:12px;
  font-weight:900;
  letter-spacing:2px;
  margin-bottom:12px;
}

.mahed-showcase-copy h3{
  margin:0;
  color:var(--ink);
  font-size:31px;
  line-height:1.45;
  font-weight:900;
}

.mahed-showcase-subtitle{
  margin:10px 0 0;
  color:var(--gold);
  font-size:13px;
  font-weight:800;
}

.mahed-showcase-description{
  margin:14px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:2.1;
  max-width:540px;
}

.mahed-showcase-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  margin-top:18px;
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}

.mahed-showcase-meta span+span{
  position:relative;
}

.mahed-showcase-meta span+span::before{
  content:"•";
  position:absolute;
  right:-11px;
  color:var(--gold);
}

.mahed-showcase-btn{
  margin-top:22px;
  min-height:43px;
  padding:10px 18px;
  border-radius:12px;
  font-size:11px;
  font-weight:900;
}

[data-theme="dark"] #liveSec.mahed-academy-showcase{
  background:var(--bg);
}

[data-theme="dark"] .mahed-showcase-label{
  background:rgba(25,28,31,.88);
  color:#fff;
}

@media(max-width:900px){
  .mahed-showcase-row{
    gap:38px;
  }

  .mahed-showcase-copy h3{
    font-size:26px;
  }

  .mahed-showcase-media{
    height:255px;
  }
}

@media(max-width:680px){
  #liveSec.mahed-academy-showcase{
    padding-top:58px!important;
    padding-bottom:72px!important;
  }

  .mahed-story-head{
    margin-bottom:26px;
  }

  .mahed-story-head h2{
    font-size:25px;
  }

  .mahed-story-head p{
    font-size:12px;
  }

  .mahed-teacher-strip{
    min-height:105px;
    margin-bottom:44px;
  }

  .mahed-teacher-mini{
    width:70px;
    height:92px;
    margin-left:-7px;
  }

  .mahed-showcase-list{
    gap:52px;
  }

  .mahed-showcase-row,
  .mahed-showcase-row.is-reverse{
    grid-template-columns:1fr;
    gap:24px;
  }

  .mahed-showcase-row.is-reverse .mahed-showcase-media,
  .mahed-showcase-row.is-reverse .mahed-showcase-copy{
    order:initial;
  }

  .mahed-showcase-media{
    height:220px;
    border-radius:20px;
  }

  .mahed-showcase-copy h3{
    font-size:22px;
  }

  .mahed-showcase-description{
    font-size:12px;
  }

  .mahed-showcase-btn{
    width:100%;
  }
}


/* =========================================================
   MAHED PROFILE SHOWCASE — FINAL
   ========================================================= */

#liveSec.mahed-academy-showcase{
  padding-top:74px!important;
  padding-bottom:100px!important;
  background:var(--bg);
}

#liveSec .mahed-story-head{
  max-width:820px;
  margin:0 auto 30px;
  text-align:center;
}

#liveSec .mahed-story-head h2{
  font-size:34px;
  color:var(--ink);
  font-weight:900;
  margin:0;
}

#liveSec .mahed-story-head p{
  max-width:690px;
  margin:10px auto 0;
  color:var(--muted);
  font-size:13px;
  line-height:2;
}

#liveSec .mahed-teacher-strip{
  min-height:190px;
  max-width:920px;
  margin:0 auto 72px;
  padding:12px 20px 0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  overflow:visible;
  border-bottom:1px solid var(--line);
}

#liveSec .mahed-profile-person{
  position:relative;
  width:104px;
  height:165px;
  margin-right:-14px;
  z-index:calc(20 - var(--person-index));
  text-align:center;
  transition:transform .35s ease;
}

#liveSec .mahed-profile-person:hover{
  transform:translateY(-10px);
  z-index:40;
}

#liveSec .mahed-profile-person img{
  position:relative;
  z-index:2;
  width:104px;
  height:145px;
  object-fit:cover;
  object-position:center top;
  display:block;
  border-radius:58px 58px 12px 12px;
  border:5px solid var(--bg);
  background:var(--card);
  box-shadow:0 14px 34px rgba(20,31,45,.13);
  mask-image:linear-gradient(to bottom,#000 82%,transparent 100%);
  -webkit-mask-image:linear-gradient(to bottom,#000 82%,transparent 100%);
}

#liveSec .mahed-profile-glow{
  position:absolute;
  z-index:1;
  width:108px;
  height:108px;
  right:-2px;
  bottom:26px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(211,158,74,.22),transparent 70%);
  filter:blur(8px);
}

#liveSec .mahed-profile-name{
  position:absolute;
  z-index:5;
  right:50%;
  transform:translateX(50%);
  bottom:0;
  white-space:nowrap;
  color:var(--ink);
  font-size:9px;
  font-weight:800;
  opacity:.85;
}

#liveSec .mahed-showcase-list,
#liveSec .mahed-profile-row{
  display:flex;
  flex-direction:column;
  gap:88px;
}

#liveSec .mahed-profile-row{
  max-width:1030px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:center;
  gap:80px;
}

#liveSec .mahed-profile-row.is-reverse .mahed-profile-image{
  order:2;
}

#liveSec .mahed-profile-row.is-reverse .mahed-profile-content{
  order:1;
}

#liveSec .mahed-profile-image{
  min-height:315px;
  border-radius:26px;
  overflow:hidden;
  background:var(--card);
  box-shadow:0 25px 65px rgba(20,31,45,.10);
}

#liveSec .mahed-profile-image img{
  display:block;
  width:100%;
  height:315px;
  object-fit:cover;
  transition:transform .6s ease;
}

#liveSec .mahed-profile-row:hover .mahed-profile-image img{
  transform:scale(1.035);
}

#liveSec .mahed-profile-image-empty{
  height:315px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:13px;
  background:
    radial-gradient(circle at 50% 30%,rgba(211,158,74,.18),transparent 35%),
    linear-gradient(145deg,var(--navy),var(--navy2));
  color:#fff;
}

#liveSec .mahed-profile-image-empty span{
  font-size:58px;
}

#liveSec .mahed-profile-image-empty small{
  font-size:11px;
  font-weight:900;
}

#liveSec .mahed-profile-content{
  text-align:right;
}

#liveSec .mahed-profile-kicker{
  color:var(--gold);
  font-size:10px;
  font-weight:900;
  letter-spacing:1.5px;
  margin-bottom:10px;
}

#liveSec .mahed-profile-content h3{
  margin:0;
  color:var(--ink);
  font-size:31px;
  line-height:1.5;
  font-weight:900;
}

#liveSec .mahed-profile-subtitle{
  margin-top:8px;
  color:var(--gold);
  font-size:13px;
  font-weight:800;
}

#liveSec .mahed-profile-content p{
  max-width:560px;
  margin:14px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:2.15;
}

#liveSec .mahed-profile-info{
  display:flex;
  flex-wrap:wrap;
  gap:8px 20px;
  margin-top:18px;
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}

#liveSec .mahed-profile-info span+span{
  position:relative;
}

#liveSec .mahed-profile-info span+span::before{
  content:"•";
  position:absolute;
  right:-12px;
  color:var(--gold);
}

#liveSec .mahed-profile-button{
  margin-top:22px;
  min-height:44px;
  border-radius:12px;
  padding:10px 20px;
  font-size:11px;
  font-weight:900;
}

[data-theme="dark"] #liveSec .mahed-profile-person img{
  border-color:var(--bg);
}

@media(max-width:850px){
  #liveSec .mahed-profile-row{
    gap:40px;
  }

  #liveSec .mahed-profile-content h3{
    font-size:25px;
  }

  #liveSec .mahed-profile-image,
  #liveSec .mahed-profile-image img,
  #liveSec .mahed-profile-image-empty{
    min-height:270px;
    height:270px;
  }
}

@media(max-width:680px){
  #liveSec.mahed-academy-showcase{
    padding-top:55px!important;
    padding-bottom:72px!important;
  }

  #liveSec .mahed-story-head h2{
    font-size:25px;
  }

  #liveSec .mahed-story-head p{
    font-size:12px;
  }

  #liveSec .mahed-teacher-strip{
    min-height:130px;
    padding:8px 10px 0;
    margin-bottom:48px;
  }

  #liveSec .mahed-profile-person{
    width:62px;
    height:112px;
    margin-right:-9px;
  }

  #liveSec .mahed-profile-person img{
    width:62px;
    height:88px;
    border-width:3px;
    border-radius:36px 36px 9px 9px;
  }

  #liveSec .mahed-profile-glow{
    width:65px;
    height:65px;
    bottom:25px;
  }

  #liveSec .mahed-profile-name{
    font-size:7px;
    max-width:65px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  #liveSec .mahed-profile-row,
  #liveSec .mahed-profile-row.is-reverse{
    grid-template-columns:1fr;
    gap:23px;
  }

  #liveSec .mahed-profile-row.is-reverse .mahed-profile-image,
  #liveSec .mahed-profile-row.is-reverse .mahed-profile-content{
    order:initial;
  }

  #liveSec .mahed-profile-image,
  #liveSec .mahed-profile-image img,
  #liveSec .mahed-profile-image-empty{
    height:220px;
    min-height:220px;
  }

  #liveSec .mahed-profile-content h3{
    font-size:22px;
  }

  #liveSec .mahed-profile-content p{
    font-size:12px;
  }

  #liveSec .mahed-profile-button{
    width:100%;
  }
}


/* =========================================================
   MAHED STORY / ACADEMY SHOWCASE — FINAL
   ========================================================= */

#liveSec.mahed-academy-showcase{
  padding-top:86px!important;
  padding-bottom:110px!important;
  background:
    radial-gradient(circle at 8% 12%,rgba(211,158,74,.07),transparent 28%),
    var(--bg);
  overflow:hidden;
}

#liveSec .mahed-story-intro{
  max-width:820px;
  margin:0 auto 46px;
  text-align:center;
}

#liveSec .mahed-story-kicker{
  margin-bottom:11px;
  color:var(--gold);
  font-size:10px;
  font-weight:900;
  letter-spacing:2px;
}

#liveSec .mahed-story-intro h2{
  margin:0;
  color:var(--ink);
  font-size:38px;
  line-height:1.4;
  font-weight:900;
}

#liveSec .mahed-story-intro p{
  max-width:720px;
  margin:14px auto 0;
  color:var(--muted);
  font-size:14px;
  line-height:2.15;
}

#liveSec .mahed-team-hero{
  position:relative;
  max-width:1120px;
  height:440px;
  margin:0 auto;
  overflow:hidden;
  border-radius:30px;
  box-shadow:0 28px 85px rgba(20,31,45,.13);
}

#liveSec .mahed-team-hero img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

#liveSec .mahed-team-overlay{
  position:absolute;
  right:30px;
  left:30px;
  bottom:28px;
  padding:24px 28px;
  border-radius:20px;
  background:rgba(15,20,28,.60);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:#fff;
}

#liveSec .mahed-team-overlay span{
  display:block;
  margin-bottom:6px;
  color:var(--gold);
  font-size:9px;
  font-weight:900;
  letter-spacing:2px;
}

#liveSec .mahed-team-overlay strong{
  display:block;
  font-size:21px;
  line-height:1.7;
}

#liveSec .mahed-service-links{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  margin:34px auto 88px;
  max-width:1100px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

#liveSec .mahed-service-links a{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  color:var(--ink);
  text-align:center;
  font-size:11px;
  font-weight:900;
  text-decoration:none;
  border-left:1px solid var(--line);
  transition:.25s ease;
}

#liveSec .mahed-service-links a:first-child{
  border-left:0;
}

#liveSec .mahed-service-links a:hover{
  color:var(--gold);
  background:rgba(211,158,74,.05);
}

#liveSec .mahed-service-links .mahed-service-club{
  color:var(--gold);
}

/* feature stories */

#liveSec .mahed-feature-story{
  max-width:1100px;
  margin:0 auto 95px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);
  gap:72px;
  align-items:center;
}

#liveSec .mahed-feature-story:last-child{
  margin-bottom:0;
}

#liveSec .mahed-feature-image{
  height:430px;
  overflow:hidden;
  border-radius:28px;
  box-shadow:0 25px 75px rgba(20,31,45,.10);
}

#liveSec .mahed-feature-image img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .7s ease;
}

#liveSec .mahed-feature-story:hover .mahed-feature-image img{
  transform:scale(1.035);
}

#liveSec .mahed-feature-story-reverse .mahed-feature-image{
  order:2;
}

#liveSec .mahed-feature-story-reverse .mahed-feature-copy{
  order:1;
}

#liveSec .mahed-feature-copy{
  text-align:right;
}

#liveSec .mahed-feature-kicker{
  display:block;
  margin-bottom:10px;
  color:var(--gold);
  font-size:11px;
  font-weight:900;
  letter-spacing:2px;
}

#liveSec .mahed-feature-copy h3{
  margin:0;
  color:var(--ink);
  font-size:34px;
  line-height:1.4;
  font-weight:900;
}

#liveSec .mahed-feature-copy h4{
  margin:10px 0 0;
  color:var(--ink);
  font-size:16px;
  line-height:1.9;
  font-weight:800;
}

#liveSec .mahed-feature-copy p{
  margin:15px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:2.2;
}

#liveSec .mahed-story-btn{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:22px;
  padding:11px 17px;
  border-radius:12px;
  color:#fff;
  background:var(--navy);
  font-size:11px;
  font-weight:900;
  text-decoration:none;
  transition:.25s ease;
}

#liveSec .mahed-story-btn span{
  transition:transform .25s ease;
}

#liveSec .mahed-story-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 25px rgba(20,31,45,.14);
}

#liveSec .mahed-story-btn:hover span{
  transform:translateX(-4px);
}

[data-theme="dark"] #liveSec .mahed-team-overlay{
  background:rgba(5,8,12,.64);
}

@media(max-width:900px){
  #liveSec .mahed-service-links{
    grid-template-columns:repeat(3,1fr);
  }

  #liveSec .mahed-service-links a:nth-child(4){
    border-left:0;
    border-top:1px solid var(--line);
  }

  #liveSec .mahed-service-links a:nth-child(n+4){
    border-top:1px solid var(--line);
  }

  #liveSec .mahed-feature-story{
    gap:42px;
  }

  #liveSec .mahed-feature-copy h3{
    font-size:28px;
  }

  #liveSec .mahed-feature-image{
    height:350px;
  }
}

@media(max-width:680px){
  #liveSec.mahed-academy-showcase{
    padding-top:62px!important;
    padding-bottom:80px!important;
  }

  #liveSec .mahed-story-intro{
    margin-bottom:30px;
  }

  #liveSec .mahed-story-intro h2{
    font-size:27px;
  }

  #liveSec .mahed-story-intro p{
    font-size:12px;
  }

  #liveSec .mahed-team-hero{
    height:250px;
    border-radius:20px;
  }

  #liveSec .mahed-team-overlay{
    right:14px;
    left:14px;
    bottom:14px;
    padding:15px 17px;
    border-radius:15px;
  }

  #liveSec .mahed-team-overlay strong{
    font-size:14px;
  }

  #liveSec .mahed-service-links{
    grid-template-columns:repeat(2,1fr);
    margin-bottom:60px;
  }

  #liveSec .mahed-service-links a,
  #liveSec .mahed-service-links a:nth-child(4){
    border-left:1px solid var(--line);
  }

  #liveSec .mahed-service-links a:nth-child(odd){
    border-left:0;
  }

  #liveSec .mahed-feature-story,
  #liveSec .mahed-feature-story-reverse{
    grid-template-columns:1fr;
    gap:24px;
    margin-bottom:62px;
  }

  #liveSec .mahed-feature-story-reverse .mahed-feature-image,
  #liveSec .mahed-feature-story-reverse .mahed-feature-copy{
    order:initial;
  }

  #liveSec .mahed-feature-image{
    height:245px;
    border-radius:20px;
  }

  #liveSec .mahed-feature-copy h3{
    font-size:25px;
  }

  #liveSec .mahed-feature-copy h4{
    font-size:13px;
  }

  #liveSec .mahed-feature-copy p{
    font-size:12px;
  }

  #liveSec .mahed-story-btn{
    width:100%;
    justify-content:center;
  }
}

/* MAHED STORY — Motion Engine */
#liveSec .mahed-story-intro,
#liveSec .mahed-team-hero,
#liveSec .mahed-service-links,
#liveSec .mahed-feature-story{
  opacity:0;
  transform:translateY(70px);
  transition:
    opacity .9s var(--mahed-motion-ease),
    transform 1s var(--mahed-motion-ease);
  will-change:opacity,transform;
}

#liveSec.mahed-motion-visible .mahed-story-intro{
  opacity:1;
  transform:none;
  transition-delay:.05s;
}

#liveSec.mahed-motion-visible .mahed-team-hero{
  opacity:1;
  transform:none;
  transition-delay:.18s;
}

#liveSec.mahed-motion-visible .mahed-service-links{
  opacity:1;
  transform:none;
  transition-delay:.30s;
}

#liveSec.mahed-motion-visible .mahed-feature-story:nth-child(1){
  opacity:1;
  transform:none;
  transition-delay:.42s;
}

#liveSec.mahed-motion-visible .mahed-feature-story:nth-child(2){
  opacity:1;
  transform:none;
  transition-delay:.58s;
}

/* ورود متفاوت برای ردیف‌های داستانی */
#liveSec .mahed-feature-story{
  transform:translateX(80px);
}

#liveSec .mahed-feature-story.is-motion-left{
  transform:translateX(-80px);
}

#liveSec.mahed-motion-visible .mahed-feature-story{
  transform:translateX(0);
}

@media(max-width:680px){
  #liveSec .mahed-feature-story,
  #liveSec .mahed-feature-story.is-motion-left{
    transform:translateY(55px);
  }

  #liveSec.mahed-motion-visible .mahed-feature-story{
    transform:translateY(0);
  }
}



/* =========================================================
   MAHED STORY MOTION — FINAL OVERRIDES
   ========================================================= */

/* عناصر اصلی Story */
#liveSec .mahed-story-motion{
  opacity:0;
  will-change:opacity,transform;
  transition:
    opacity .85s cubic-bezier(.22,1,.36,1),
    transform .95s cubic-bezier(.22,1,.36,1);
}

/* Intro */
#liveSec .mahed-story-intro{
  transform:translateY(55px);
}

/* Team */
#liveSec .mahed-team-hero{
  transform:translateY(65px);
}

/* Services */
#liveSec .mahed-service-links{
  transform:translateY(55px);
}

/* Story rows */
#liveSec .mahed-feature-story{
  opacity:0;
}

#liveSec .mahed-story-first{
  transform:translateX(75px);
}

#liveSec .mahed-story-second{
  transform:translateX(-75px);
}

/* حالت visible */
#liveSec.mahed-motion-visible .mahed-story-intro{
  opacity:1;
  transform:translateY(0);
  transition-delay:.05s;
}

#liveSec.mahed-motion-visible .mahed-team-hero{
  opacity:1;
  transform:translateY(0);
  transition-delay:.18s;
}

#liveSec.mahed-motion-visible .mahed-service-links{
  opacity:1;
  transform:translateY(0);
  transition-delay:.30s;
}

#liveSec.mahed-motion-visible .mahed-story-first{
  opacity:1;
  transform:translateX(0);
  transition-delay:.44s;
}

#liveSec.mahed-motion-visible .mahed-story-second{
  opacity:1;
  transform:translateX(0);
  transition-delay:.62s;
}

/* Mobile */
@media(max-width:680px){

  #liveSec .mahed-story-first,
  #liveSec .mahed-story-second{
    transform:translateY(48px);
  }

  #liveSec.mahed-motion-visible .mahed-story-first,
  #liveSec.mahed-motion-visible .mahed-story-second{
    transform:translateY(0);
  }
}

/* کاهش حرکت سیستم‌عامل */
@media(prefers-reduced-motion:reduce){

  #liveSec .mahed-story-motion,
  #liveSec .mahed-feature-story{
    opacity:1!important;
    transform:none!important;
    transition:none!important;
  }

}


/* CMS-managed main navigation */
#mainNavLinks{
  display:flex;
  align-items:center;
  gap:clamp(14px,1.6vw,26px);
  flex-wrap:nowrap;
}

#mainNavLinks > a{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
}

@media (max-width: 980px){
  #mainNavLinks{
    gap:14px;
    flex-wrap:wrap;
  }
}

/* Footer CTA: همیشه خوانا */
.mahed-footer-test-link,
.mahed-footer-test-link:link,
.mahed-footer-test-link:visited{
  color:#fff !important;
  background:linear-gradient(135deg,var(--gold),#d98b00) !important;
  opacity:1 !important;
  text-decoration:none !important;
  text-shadow:0 1px 2px rgba(0,0,0,.18);
}

.mahed-footer-test-link:hover,
.mahed-footer-test-link:focus-visible{
  color:#fff !important;
  opacity:1 !important;
  filter:brightness(1.05);
}

.mahed-footer-test-link span{
  color:inherit !important;
}





/* ===== CLEAN FOOTER SOCIAL ===== */
#socialLinks{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}

#socialLinks > a{
  box-sizing:border-box !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  max-width:42px !important;
  padding:0 !important;
  margin:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 42px !important;
  position:relative !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:#fff !important;
  text-decoration:none !important;
  font-size:0 !important;
  line-height:0 !important;
  overflow:hidden !important;
  opacity:1 !important;
  visibility:visible !important;
  text-indent:0 !important;
}

#socialLinks > a svg{
  display:block !important;
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  min-height:24px !important;
  max-width:24px !important;
  max-height:24px !important;
  color:#fff !important;
  fill:currentColor !important;
  stroke:currentColor !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:none !important;
}

#socialLinks > a:hover{
  background:rgba(255,255,255,.18) !important;
  color:#fff !important;
  transform:translateY(-2px) !important;
}

#socialLinks > a::before,
#socialLinks > a::after{
  content:none !important;
  display:none !important;
}


/* ===== REAL PROJECT SOCIAL PNGs ===== */
#socialLinks > a#socialInstagram,
#socialLinks > a#socialTelegram,
#socialLinks > a#socialLinkedin{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  max-width:42px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
  overflow:hidden !important;
  text-indent:0 !important;
}

#socialLinks > a#socialInstagram img,
#socialLinks > a#socialTelegram img,
#socialLinks > a#socialLinkedin img{
  display:block !important;
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  min-height:24px !important;
  max-width:24px !important;
  max-height:24px !important;
  object-fit:contain !important;
  object-position:center !important;
  opacity:1 !important;
  visibility:visible !important;
  position:static !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  filter:none !important;
}

#socialLinks > a#socialInstagram:hover,
#socialLinks > a#socialTelegram:hover,
#socialLinks > a#socialLinkedin:hover{
  background:rgba(255,255,255,.18) !important;
}


/* ===== FINAL REAL PROJECT SOCIAL SVG ASSETS ===== */
#socialLinks{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}

#socialLinks > a#socialInstagram,
#socialLinks > a#socialTelegram,
#socialLinks > a#socialLinkedin{
  box-sizing:border-box !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  max-width:42px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:#fff !important;
  text-decoration:none !important;
  font-size:0 !important;
  line-height:0 !important;
  text-indent:0 !important;
  overflow:hidden !important;
}

#socialLinks > a#socialInstagram img,
#socialLinks > a#socialTelegram img,
#socialLinks > a#socialLinkedin img{
  display:block !important;
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  min-height:24px !important;
  max-width:24px !important;
  max-height:24px !important;
  object-fit:contain !important;
  object-position:center !important;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
  position:static !important;
  margin:0 !important;
  padding:0 !important;
}

#socialLinks > a::before,
#socialLinks > a::after{
  content:none !important;
  display:none !important;
}


/* ===== FINAL PROJECT SOCIAL PNG DISPLAY ===== */
#socialLinks{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}

#socialLinks > a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  max-width:42px !important;
  padding:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
}

#socialLinks > a > img{
  display:block !important;
  width:26px !important;
  height:26px !important;
  min-width:26px !important;
  min-height:26px !important;
  max-width:26px !important;
  max-height:26px !important;
  object-fit:contain !important;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
}

/* Footer social spacing */
#socialLinks{
  margin-top:18px !important;
}


/* =========================================================
   MAHED — MOBILE FINAL / NEW SECTIONS + PANELS
   ========================================================= */

@media (max-width: 680px){

  /* ---------- GLOBAL ---------- */
  html, body{
    max-width:100%;
    overflow-x:hidden;
  }

  img, video{
    max-width:100%;
  }

  button,
  input,
  select,
  textarea{
    font-size:16px;
  }

  .container{
    width:100%;
    max-width:100%;
    padding-left:14px;
    padding-right:14px;
  }

  /* ---------- INTRO / HERO GLASS CARD ---------- */
  .hero-grid{
    position:relative;
    min-height:500px;
    margin-top:20px;
    padding:0 10px;
  }

  .hero-grid>div:first-child{
    position:relative;
    z-index:3;
    top:auto;
    right:auto;
    left:auto;
    width:100%;
    max-width:100%;
    min-height:auto;
    padding:26px 20px;
    border-radius:26px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.25);
    box-shadow:0 18px 50px rgba(0,0,0,.18);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
  }

  .hero-grid>div:first-child::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    background:linear-gradient(
      135deg,
      rgba(255,255,255,.16),
      rgba(255,255,255,.04)
    );
    pointer-events:none;
  }

  .hero-grid>div:first-child>*{
    position:relative;
    z-index:1;
  }

  .hero h1{
    font-size:28px;
    line-height:1.55;
    margin-bottom:12px;
  }

  .hero p{
    font-size:14px;
    line-height:2;
  }

  .hero .btn{
    min-height:46px;
    width:100%;
    justify-content:center;
  }

  .hero-media,
  .hero-media video{
    border-radius:26px !important;
  }

  /* ---------- SHOWCASE ---------- */
  #liveSec.mahed-academy-showcase{
    padding-top:38px;
    padding-bottom:38px;
    overflow:hidden;
  }

  #liveSec .mahed-story-intro{
    padding:0 4px;
    margin-bottom:24px;
  }

  #liveSec .mahed-story-intro h2,
  #liveSec .mahed-story-intro h1{
    font-size:25px;
    line-height:1.7;
  }

  #liveSec .mahed-story-intro p{
    font-size:14px;
    line-height:2.15;
  }

  #liveSec .mahed-team-hero{
    height:280px;
    min-height:280px;
    border-radius:22px;
    margin-bottom:22px;
  }

  #liveSec .mahed-team-hero img{
    width:100%;
    height:100%;
    object-fit:cover;
  }

  #liveSec .mahed-service-links{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-bottom:28px;
  }

  #liveSec .mahed-service-links a{
    min-height:58px;
    padding:12px 9px;
    font-size:12px;
    line-height:1.7;
    text-align:center;
  }

  #liveSec .mahed-feature-story,
  #liveSec .mahed-feature-story.mahed-feature-story-reverse{
    display:flex;
    flex-direction:column;
    gap:18px;
    margin-top:28px;
  }

  #liveSec .mahed-feature-story-image{
    width:100%;
    order:0;
  }

  #liveSec .mahed-feature-story-content{
    width:100%;
    order:1;
  }

  #liveSec .mahed-feature-story h2{
    font-size:22px;
    line-height:1.7;
  }

  #liveSec .mahed-feature-story h3{
    font-size:16px;
    line-height:1.9;
  }

  #liveSec .mahed-feature-story p{
    font-size:13px;
    line-height:2.05;
  }

  #liveSec .mahed-feature-story .btn{
    width:100%;
    min-height:46px;
    justify-content:center;
  }

  /* ---------- VISUAL BREAK ---------- */
  .mahed-visual-break{
    min-height:280px !important;
    height:280px !important;
    border-radius:24px !important;
    margin-left:0;
    margin-right:0;
    overflow:hidden;
    background-attachment:scroll !important;
  }

  /* keep visual appearance while avoiding mobile browser parallax glitches */
  .mahed-visual-break::before,
  .mahed-visual-break::after{
    pointer-events:none;
  }

  /* ---------- COMMON CARDS ---------- */
  .card,
  .box,
  .glass-card,
  .dashboard-card,
  .kpi{
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }

  /* ---------- ACCOUNT / STUDENT / TEACHER ---------- */
  #accountRoot,
  #accountRoot .container,
  .dashboard-inner{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .dashboard-inner{
    padding:0 !important;
  }

  .dashboard-inner .grid,
  .dashboard-inner .two-col{
    grid-template-columns:1fr !important;
  }

  .dashboard-inner .card,
  .dashboard-inner .panel,
  .dashboard-inner section{
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }

  .dashboard-inner table{
    display:block;
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    white-space:nowrap;
  }

  .dashboard-inner .btn{
    min-height:44px;
  }

  /* ---------- ADMIN ---------- */
  #adminRoot,
  #admPanels{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  #admPanels{
    overflow:hidden;
  }

  #admPanels .panel{
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }

  #admPanels .grid,
  #admPanels .two-col{
    grid-template-columns:1fr !important;
  }

  #admPanels .field{
    min-width:0;
  }

  #admPanels input,
  #admPanels select,
  #admPanels textarea{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }

  #admPanels table{
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    white-space:nowrap;
  }

  #admPanels .btn{
    min-height:44px;
  }

  #admPanels .kpi{
    width:100%;
  }

  /* admin action rows */
  #admPanels .actions,
  #admPanels .toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }

  #admPanels .actions .btn,
  #admPanels .toolbar .btn{
    flex:1 1 auto;
  }

  /* ---------- LIVE / CHAT ---------- */
  .live-banner{
    border-radius:18px;
    padding:15px;
  }

  .chat-box{
    width:100%;
    min-width:0;
  }

  /* ---------- FOOTER ---------- */
  #socialLinks{
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
  }
}


/* Extra-small phones */
@media (max-width:420px){

  .hero h1{
    font-size:25px;
  }

  .hero-grid{
    min-height:470px;
  }

  .hero-grid>div:first-child{
    padding:22px 16px;
    border-radius:22px;
  }

  #liveSec .mahed-service-links{
    grid-template-columns:1fr 1fr;
  }

  #liveSec .mahed-team-hero{
    height:240px;
    min-height:240px;
    border-radius:20px;
  }

  .section{
    padding-top:40px;
    padding-bottom:40px;
  }
}

/* ===== MOBILE INTRO GLASS — FINAL ===== */
@media (max-width:680px){

  .hero-grid>div:first-child{
    position:absolute !important;
    top:55px !important;
    right:14px !important;
    left:14px !important;
    width:auto !important;
    max-width:none !important;
    min-height:380px !important;

    padding:24px 18px !important;

    background:rgba(255,255,255,.20) !important;
    border:1px solid rgba(255,255,255,.48) !important;

    border-radius:26px !important;

    backdrop-filter:blur(18px) saturate(135%) !important;
    -webkit-backdrop-filter:blur(18px) saturate(135%) !important;

    box-shadow:
      0 20px 55px rgba(0,0,0,.18),
      inset 0 1px 0 rgba(255,255,255,.42) !important;

    z-index:10 !important;
    overflow:hidden !important;
  }

  .hero-grid>div:first-child::before{
    content:"" !important;
    position:absolute !important;
    inset:0 !important;
    border-radius:inherit !important;

    background:
      linear-gradient(
        135deg,
        rgba(255,255,255,.24),
        rgba(255,255,255,.06)
      ) !important;

    pointer-events:none !important;
    z-index:0 !important;
  }

  .hero-grid>div:first-child > *{
    position:relative !important;
    z-index:1 !important;
  }

  .hero-badge{
    background:rgba(255,255,255,.62) !important;
    border-color:rgba(255,255,255,.55) !important;
    backdrop-filter:blur(8px) !important;
    -webkit-backdrop-filter:blur(8px) !important;
  }

  .hero h1{
    text-shadow:0 2px 12px rgba(255,255,255,.22);
  }

  .hero p{
    text-shadow:0 1px 8px rgba(255,255,255,.16);
  }

  [data-theme="dark"] .hero-grid>div:first-child{
    background:rgba(25,27,29,.42) !important;
    border-color:rgba(255,255,255,.18) !important;
    box-shadow:
      0 20px 55px rgba(0,0,0,.38),
      inset 0 1px 0 rgba(255,255,255,.10) !important;
  }

  [data-theme="dark"] .hero-grid>div:first-child::before{
    background:linear-gradient(
      135deg,
      rgba(255,255,255,.10),
      rgba(255,255,255,.025)
    ) !important;
  }
}

/* ===== MOBILE HERO / REAL GLASS CARD ===== */
@media (max-width:680px){

  .hero{
    position:relative !important;
    overflow:hidden !important;
  }

  .hero-grid{
    min-height:500px !important;
    margin-top:20px !important;
    padding:0 18px !important;
  }

  /* کارت اصلی Intro */
  .hero-grid>div:first-child{
    position:absolute !important;
    top:42px !important;
    right:26px !important;
    left:26px !important;

    width:auto !important;
    max-width:none !important;
    min-height:0 !important;

    padding:18px 16px !important;
    border-radius:20px !important;

    background:rgba(255,255,255,.26) !important;
    border:1px solid rgba(255,255,255,.55) !important;

    backdrop-filter:blur(22px) saturate(145%) !important;
    -webkit-backdrop-filter:blur(22px) saturate(145%) !important;

    box-shadow:
      0 12px 30px rgba(0,0,0,.16),
      inset 0 1px 0 rgba(255,255,255,.45) !important;

    z-index:20 !important;
  }

  .hero-grid>div:first-child::before{
    content:"" !important;
    position:absolute !important;
    inset:0 !important;
    border-radius:20px !important;
    background:linear-gradient(
      135deg,
      rgba(255,255,255,.20),
      rgba(255,255,255,.035)
    ) !important;
    pointer-events:none !important;
  }

  .hero-grid>div:first-child>*{
    position:relative !important;
    z-index:2 !important;
  }

  .hero-badge{
    font-size:10px !important;
    padding:5px 10px !important;
    margin-bottom:9px !important;
    border-radius:30px !important;
  }

  .hero h1{
    font-size:22px !important;
    line-height:1.45 !important;
    margin-bottom:8px !important;
  }

  .hero p{
    font-size:12px !important;
    line-height:1.8 !important;
    margin-bottom:13px !important;
  }

  .hero-actions{
    gap:7px !important;
  }

  .hero-actions .btn{
    min-height:38px !important;
    padding:7px 12px !important;
    font-size:11px !important;
    border-radius:9px !important;
  }

  .hero-stats{
    gap:14px !important;
    margin-top:13px !important;
  }

  .hero-stats b{
    font-size:18px !important;
  }

  .hero-stats span{
    font-size:9px !important;
  }

  /* تصویر/ویدئوی پشت کارت */
  .hero-media,
  .hero-media video{
    height:500px !important;
    min-height:500px !important;
    border-radius:24px !important;
  }
}

/* گوشی خیلی کوچک */
@media (max-width:390px){

  .hero-grid{
    min-height:440px !important;
    padding:0 14px !important;
  }

  .hero-grid>div:first-child{
    top:34px !important;
    right:20px !important;
    left:20px !important;
    padding:15px 13px !important;
    border-radius:18px !important;
  }

  .hero h1{
    font-size:19px !important;
  }

  .hero p{
    font-size:11px !important;
    line-height:1.7 !important;
  }

  .hero-actions{
    flex-direction:column !important;
  }

  .hero-actions .btn{
    width:100% !important;
  }

  .hero-stats{
    justify-content:space-between !important;
    gap:8px !important;
  }

  .hero-stats b{
    font-size:16px !important;
  }
}

/* ===== MOBILE INTRO VIDEO — WIDE ===== */
@media (max-width:680px){

  .hero-grid{
    min-height:390px !important;
  }

  .hero-media,
  .hero-media video{
    height:auto !important;
    aspect-ratio:16 / 9 !important;
    min-height:0 !important;
    max-height:none !important;
    border-radius:22px !important;
  }

  .hero-media{
    top:0 !important;
    bottom:auto !important;
    inset:0 0 auto 0 !important;
  }

  .hero-grid>div:first-child{
    top:30px !important;
    max-height:none !important;
  }
}

@media (max-width:390px){

  .hero-grid{
    min-height:335px !important;
  }

  .hero-media,
  .hero-media video{
    aspect-ratio:16 / 9 !important;
    border-radius:19px !important;
  }

  .hero-grid>div:first-child{
    top:24px !important;
  }
}

/* ===== MOBILE HERO: GLASS CARD FIT VIDEO ===== */
@media (max-width:680px){

  .hero-grid{
    min-height:auto !important;
    margin-top:20px !important;
    padding:0 14px !important;
  }

  .hero-media,
  .hero-media video{
    width:100% !important;
    height:auto !important;
    aspect-ratio:16 / 9 !important;
    min-height:0 !important;
    border-radius:22px !important;
  }

  .hero-grid>div:first-child{
    top:14px !important;
    right:28px !important;
    left:28px !important;
    width:auto !important;

    /* اندازه محتوا را تعیین می‌کند */
    min-height:0 !important;
    padding:16px 15px !important;

    border-radius:18px !important;
  }

  .hero-badge{
    margin-bottom:7px !important;
  }

  .hero h1{
    margin-bottom:6px !important;
  }

  .hero p{
    margin-bottom:9px !important;
  }

  .hero-stats{
    margin-top:10px !important;
  }
}

@media (max-width:390px){

  .hero-media,
  .hero-media video{
    border-radius:19px !important;
  }

  .hero-grid>div:first-child{
    top:10px !important;
    right:22px !important;
    left:22px !important;
    padding:13px 12px !important;
    border-radius:16px !important;
  }

  .hero-badge{
    font-size:9px !important;
    padding:4px 8px !important;
  }

  .hero h1{
    font-size:18px !important;
  }

  .hero p{
    font-size:10px !important;
    line-height:1.6 !important;
  }

  .hero-actions .btn{
    min-height:34px !important;
    padding:6px 10px !important;
    font-size:10px !important;
  }

  .hero-stats b{
    font-size:15px !important;
  }
}

/* ===== MOBILE HERO GLASS — LAYER FIX ===== */
@media (max-width:680px){

  .hero-grid{
    position:relative !important;
    isolation:isolate !important;
    z-index:5 !important;
  }

  .hero-media{
    position:absolute !important;
    z-index:0 !important;
  }

  .hero-media video{
    position:relative !important;
    z-index:0 !important;
  }

  .hero-grid>div:first-child{
    position:absolute !important;
    z-index:50 !important;
    isolation:isolate !important;

    overflow:visible !important;

    transform:translateZ(0) !important;
    -webkit-transform:translateZ(0) !important;
  }

  .hero-grid>div:first-child::before{
    z-index:-1 !important;
  }

  .hero-grid>div:first-child > *{
    position:relative !important;
    z-index:2 !important;
  }

  .hero-actions,
  .hero-stats{
    position:relative !important;
    z-index:3 !important;
  }
}

/* ===== MOBILE HERO — RESTORE CORRECT LAYERING ===== */
@media (max-width:680px){

  .hero-grid{
    position:relative !important;
    isolation:auto !important;
    z-index:1 !important;
  }

  .hero-media{
    position:absolute !important;
    z-index:0 !important;
  }

  .hero-media video{
    position:relative !important;
    z-index:0 !important;
  }

  .hero-grid>div:first-child{
    position:absolute !important;
    z-index:10 !important;
    isolation:auto !important;
    overflow:hidden !important;

    transform:none !important;
    -webkit-transform:none !important;
  }

  .hero-grid>div:first-child::before{
    z-index:0 !important;
  }

  .hero-grid>div:first-child > *{
    position:relative !important;
    z-index:1 !important;
  }
}

/* =========================================================
   MAHED MOBILE HERO — CLEAN FINAL OVERRIDE
   ========================================================= */
@media (max-width:680px){

  .hero{
    position:relative !important;
    overflow:hidden !important;
  }

  .hero-grid{
    position:relative !important;
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    margin:20px auto 0 !important;
    padding:0 14px !important;
  }

  /* ویدئو = قاب اصلی */
  .hero-media{
    position:relative !important;
    inset:auto !important;
    width:100% !important;
    height:auto !important;
    aspect-ratio:16/9 !important;
    min-height:0 !important;
    max-height:none !important;
    z-index:1 !important;
    display:block !important;
    visibility:visible !important;
    overflow:hidden !important;
    border-radius:22px !important;
    margin:0 !important;
  }

  .hero-media video{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    object-fit:cover !important;
    z-index:1 !important;
    border-radius:inherit !important;
  }

  /* کارت شیشه‌ای روی خود ویدئو */
  .hero-grid>div:first-child{
    position:absolute !important;
    z-index:20 !important;

    top:14px !important;
    right:28px !important;
    left:28px !important;
    width:auto !important;
    max-width:none !important;

    min-height:0 !important;
    height:auto !important;

    padding:15px 14px !important;
    margin:0 !important;

    background:rgba(255,255,255,.24) !important;
    border:1px solid rgba(255,255,255,.55) !important;
    border-radius:18px !important;

    backdrop-filter:blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter:blur(20px) saturate(140%) !important;

    box-shadow:
      0 12px 28px rgba(0,0,0,.16),
      inset 0 1px 0 rgba(255,255,255,.45) !important;

    overflow:hidden !important;
  }

  .hero-grid>div:first-child::before{
    content:"" !important;
    position:absolute !important;
    inset:0 !important;
    z-index:0 !important;
    border-radius:inherit !important;
    background:linear-gradient(
      135deg,
      rgba(255,255,255,.22),
      rgba(255,255,255,.04)
    ) !important;
    pointer-events:none !important;
  }

  .hero-grid>div:first-child>*{
    position:relative !important;
    z-index:2 !important;
  }

  .hero-badge{
    font-size:9px !important;
    padding:4px 9px !important;
    margin-bottom:7px !important;
  }

  .hero h1{
    font-size:20px !important;
    line-height:1.4 !important;
    margin-bottom:6px !important;
  }

  .hero p{
    font-size:11px !important;
    line-height:1.7 !important;
    margin-bottom:9px !important;
  }

  .hero-actions{
    gap:6px !important;
  }

  .hero-actions .btn{
    min-height:34px !important;
    padding:5px 10px !important;
    font-size:10px !important;
    border-radius:8px !important;
  }

  .hero-stats{
    gap:12px !important;
    margin-top:9px !important;
  }

  .hero-stats b{
    font-size:16px !important;
  }

  .hero-stats span{
    font-size:8px !important;
  }

  /* فضای پایین فقط به اندازه قاب ویدئو */
  .hero{
    padding-bottom:24px !important;
  }
}

@media (max-width:390px){

  .hero-grid{
    padding:0 12px !important;
  }

  .hero-media{
    aspect-ratio:16/9 !important;
    border-radius:19px !important;
  }

  .hero-grid>div:first-child{
    top:10px !important;
    right:20px !important;
    left:20px !important;
    padding:12px 11px !important;
    border-radius:16px !important;
  }

  .hero h1{
    font-size:17px !important;
  }

  .hero p{
    font-size:10px !important;
  }

  .hero-actions{
    flex-direction:column !important;
  }

  .hero-actions .btn{
    width:100% !important;
  }
}

/* فقط فشرده‌سازی پایین کارت Intro موبایل */
@media (max-width:680px){

  .hero-stats{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    margin-top:6px !important;
    padding-top:2px !important;
  }

  .hero-stats > div{
    flex:1 1 0 !important;
    min-width:0 !important;
    text-align:center !important;
  }

  .hero-stats b{
    font-size:15px !important;
    line-height:1.2 !important;
    margin:0 !important;
  }

  .hero-stats span{
    display:block !important;
    font-size:8px !important;
    line-height:1.4 !important;
    white-space:nowrap !important;
  }

  .hero-grid>div:first-child{
    padding-bottom:11px !important;
  }
}

@media (max-width:390px){

  .hero-stats{
    gap:5px !important;
    margin-top:4px !important;
  }

  .hero-stats b{
    font-size:14px !important;
  }

  .hero-stats span{
    font-size:7px !important;
  }

  .hero-grid>div:first-child{
    padding-bottom:9px !important;
  }
}

/* حذف آمار پایین کارت Intro در موبایل */
@media (max-width:680px){
  .hero-stats{
    display:none !important;
  }
}

/* ===== MOBILE INTRO — GLASS CARD LIKE DESKTOP ===== */
@media (max-width:680px){

  .hero-grid>div:first-child{
    top:18px !important;
    right:36px !important;
    left:auto !important;

    width:72% !important;
    max-width:330px !important;

    min-height:0 !important;
    padding:14px 14px 13px !important;

    border-radius:18px !important;

    background:rgba(255,255,255,.24) !important;
    border:1px solid rgba(255,255,255,.55) !important;

    backdrop-filter:blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter:blur(20px) saturate(140%) !important;

    box-shadow:
      0 12px 30px rgba(0,0,0,.16),
      inset 0 1px 0 rgba(255,255,255,.45) !important;

    z-index:20 !important;
  }

  .hero-badge{
    margin-bottom:6px !important;
  }

  .hero h1{
    font-size:19px !important;
    line-height:1.4 !important;
    margin-bottom:6px !important;
  }

  .hero p{
    font-size:10.5px !important;
    line-height:1.7 !important;
    margin-bottom:8px !important;
  }

  .hero-actions{
    gap:6px !important;
  }

  .hero-actions .btn{
    min-height:33px !important;
    padding:5px 9px !important;
    font-size:10px !important;
  }

  .hero-stats{
    display:none !important;
  }
}

@media (max-width:390px){

  .hero-grid>div:first-child{
    top:14px !important;
    right:25px !important;
    width:76% !important;
    max-width:285px !important;
    padding:12px 11px !important;
    border-radius:16px !important;
  }

  .hero h1{
    font-size:17px !important;
  }

  .hero p{
    font-size:9.5px !important;
  }

  .hero-actions .btn{
    font-size:9.5px !important;
    min-height:31px !important;
  }
}

/* ===== MOBILE INTRO CARD — SMALLER ===== */
@media (max-width:680px){
  .hero-grid>div:first-child{
    top:18px !important;
    right:34px !important;
    left:auto !important;
    width:58% !important;
    max-width:260px !important;
    padding:11px 11px 10px !important;
    border-radius:15px !important;
  }

  .hero-badge{
    font-size:8px !important;
    padding:3px 7px !important;
    margin-bottom:4px !important;
  }

  .hero h1{
    font-size:16px !important;
    line-height:1.35 !important;
    margin-bottom:4px !important;
  }

  .hero p{
    font-size:9px !important;
    line-height:1.55 !important;
    margin-bottom:6px !important;
  }

  .hero-actions{
    gap:4px !important;
  }

  .hero-actions .btn{
    min-height:28px !important;
    padding:4px 7px !important;
    font-size:8.5px !important;
    border-radius:7px !important;
  }
}

@media (max-width:390px){
  .hero-grid>div:first-child{
    top:14px !important;
    right:24px !important;
    width:61% !important;
    max-width:230px !important;
    padding:9px 9px 8px !important;
  }

  .hero h1{
    font-size:14px !important;
  }

  .hero p{
    font-size:8px !important;
  }

  .hero-actions .btn{
    font-size:8px !important;
    min-height:26px !important;
  }
}

/* =========================================================
   MAHED ADMIN — MODERN EDITOR UI
   ========================================================= */

.admin-help{
  display:block;
  margin-top:6px;
  color:#848990;
  font-size:11px;
  line-height:1.8;
}

.admin-section-title{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 8px;
  font-size:18px;
  font-weight:900;
  color:var(--ink);
}

.admin-section-subtitle{
  display:block;
  margin:0 0 18px;
  color:var(--muted);
  font-size:12px;
  line-height:1.9;
}

.admin-editor-card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:20px;
  background:var(--card);
  box-shadow:0 8px 26px rgba(58,61,65,.055);
}

.admin-media-field{
  padding:13px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:var(--surface);
}

.admin-media-label{
  display:block;
  margin-bottom:7px;
  font-size:12px;
  font-weight:800;
  color:var(--ink);
}

.admin-file-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.admin-file-wrap input[type="file"]{
  width:100%;
  max-width:100%;
  min-height:44px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  color:var(--muted);
  cursor:pointer;
}

.admin-file-wrap input[type="file"]::file-selector-button{
  border:0;
  border-radius:10px;
  padding:9px 14px;
  margin-left:8px;
  background:var(--gold);
  color:#fff;
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.admin-file-wrap input[type="file"]::file-selector-button:hover{
  background:var(--gold-d);
}

.admin-preview{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:10px;
  padding:9px;
  border-radius:12px;
  background:var(--card);
  border:1px solid var(--line);
}

.admin-preview img{
  width:64px;
  height:48px;
  object-fit:cover;
  border-radius:9px;
  border:1px solid var(--line);
  background:var(--surface);
}

.admin-preview span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  color:var(--muted);
}

.admin-size-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:7px;
  padding:4px 9px;
  border-radius:999px;
  background:#fff4ea;
  color:#b84d00;
  font-size:10px;
  font-weight:800;
}

[data-theme="dark"] .admin-size-badge{
  background:#2b211a;
  color:#ff9b5b;
}

[data-theme="dark"] .admin-media-field{
  background:#1b1c1d;
}

[data-theme="dark"] .admin-preview{
  background:#202223;
}

/* Modernize every admin file input, including inputs created dynamically */
#admPanels input[type="file"]{
  font-family:inherit;
  border-radius:12px;
}

#admPanels .card h3{
  font-weight:900;
}

#admPanels .card h4{
  font-size:14px;
  font-weight:900;
  color:var(--ink);
}

@media(max-width:680px){
  .admin-editor-card{
    padding:14px;
    border-radius:15px;
  }

  .admin-file-wrap{
    display:block;
  }

  .admin-file-wrap input[type="file"]{
    margin-top:4px;
  }

  .admin-section-title{
    font-size:16px;
  }
}

/* =========================================================
   MAHED ADMIN — MODERN CHOOSE FILE BUTTON
   ========================================================= */

#admPanels input[type="file"]{
  position:relative;
  width:100%;
  min-height:46px;
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
  color:var(--muted);
  font-family:inherit;
  font-size:11px;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(58,61,65,.04);
}

#admPanels input[type="file"]::file-selector-button{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  outline:0;
  margin-left:10px;
  padding:10px 16px;
  min-height:36px;
  border-radius:10px;
  background:linear-gradient(135deg,#ff6a00,#ff8533);
  color:#fff;
  font-family:inherit;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
  box-shadow:0 6px 14px rgba(255,106,0,.20);
}

#admPanels input[type="file"]::file-selector-button:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(255,106,0,.28);
}

#admPanels input[type="file"]::file-selector-button:active{
  transform:translateY(0);
}

[data-theme="dark"] #admPanels input[type="file"]{
  background:#202223;
  border-color:#383b3e;
  color:#a3a6aa;
}

@media(max-width:680px){
  #admPanels input[type="file"]{
    min-height:48px;
    border-radius:13px;
  }

  #admPanels input[type="file"]::file-selector-button{
    padding:9px 13px;
    font-size:10px;
  }
}

/* =========================================================
   MAHED ADMIN — CLEAN IMAGE URL + UPLOAD LAYOUT
   ========================================================= */

#admPanels .field > div[style*="display:flex"]{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:8px !important;
  align-items:center !important;
}

#admPanels .field > div[style*="display:flex"] > input[type="text"],
#admPanels .field > div[style*="display:flex"] > input:not([type]),
#admPanels .field > div[style*="display:flex"] > input[style*="flex:1"]{
  width:100% !important;
  min-width:0 !important;
}

#admPanels .field > div[style*="display:flex"] > input[type="file"]{
  width:230px !important;
  min-width:230px !important;
  margin:0 !important;
}

@media(max-width:680px){
  #admPanels .field > div[style*="display:flex"]{
    grid-template-columns:1fr !important;
  }

  #admPanels .field > div[style*="display:flex"] > input[type="file"]{
    width:100% !important;
    min-width:0 !important;
  }
}


/* =========================
   MAHED VISUAL LIVE EDITOR
   ========================= */
body.mahed-live-edit #mahedVisualEditor{
  position:absolute;
  z-index:999999;
  display:none;
  pointer-events:auto;
}

body.mahed-live-edit #mahedVisualEditor button{
  border:1px solid rgba(212,170,73,.65);
  background:rgba(13,25,42,.96);
  color:#f4d98a;
  border-radius:10px;
  padding:8px 12px;
  font:800 12px/1 inherit;
  cursor:pointer;
  box-shadow:0 8px 25px rgba(0,0,0,.22);
  white-space:nowrap;
}

body.mahed-live-edit .mahed-live-hover-target{
  outline:2px solid rgba(214,171,72,.95)!important;
  outline-offset:4px!important;
  box-shadow:0 0 0 5px rgba(214,171,72,.12)!important;
  cursor:crosshair!important;
}

body.mahed-live-edit .mahed-live-hover-target::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
}

.mahed-universal-editor-dialog{
  width:min(680px,calc(100vw - 28px));
  max-height:calc(100vh - 40px);
  overflow:auto;
}

.mahed-live-editor-target{
  display:flex;
  gap:8px;
  align-items:center;
  padding:11px 13px;
  border-radius:12px;
  margin-bottom:14px;
  background:rgba(214,171,72,.08);
  border:1px solid rgba(214,171,72,.25);
  font-size:13px;
}

.mahed-live-editor-target span{
  color:var(--muted);
}

body.mahed-live-edit .mahed-live-tools{
  z-index:999990;
}

@media(max-width:700px){
  body.mahed-live-edit #mahedVisualEditor button{
    padding:7px 10px;
    font-size:11px;
  }

  .mahed-universal-editor-dialog{
    width:calc(100vw - 18px);
    margin:9px;
  }
}


/* Visual editor action panel */
body.mahed-live-edit #mahedVisualEditor{
  position:absolute;
  z-index:999999;
  display:none;
  pointer-events:auto;
  min-width:235px;
  padding:7px;
  border-radius:14px;
  background:rgba(10,20,34,.97);
  border:1px solid rgba(214,171,72,.5);
  box-shadow:0 14px 35px rgba(0,0,0,.28);
  direction:rtl;
}

body.mahed-live-edit .mahed-visual-editor-label{
  color:#f3d789;
  font-size:11px;
  font-weight:900;
  padding:4px 8px 7px;
}

body.mahed-live-edit .mahed-visual-editor-actions{
  display:flex;
  gap:5px;
  align-items:center;
}

body.mahed-live-edit .mahed-visual-editor-actions button{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:9px;
  padding:7px 9px;
  font:800 11px/1 inherit;
  cursor:pointer;
  white-space:nowrap;
}

body.mahed-live-edit .mahed-visual-editor-actions button:hover{
  background:rgba(214,171,72,.16);
  border-color:rgba(214,171,72,.4);
}

body.mahed-live-edit .mahed-visual-editor-actions [data-action="edit"]{
  background:rgba(214,171,72,.16);
  color:#f4d98a;
}

body.mahed-live-edit .mahed-visual-editor-actions [data-action="delete"]{
  color:#ffb2b2;
}

@media(max-width:700px){
  body.mahed-live-edit #mahedVisualEditor{
    min-width:0;
    max-width:calc(100vw - 20px);
  }

  body.mahed-live-edit .mahed-visual-editor-actions button{
    padding:8px 8px;
    font-size:10px;
  }
}

/* ---------- VISUAL EDITOR SAVE BAR ---------- */
body.mahed-live-edit #mahedVisualSaveBar{
  position:fixed;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  z-index:1000000;
  display:none;
  align-items:center;
  gap:14px;
  padding:8px 11px;
  border-radius:15px;
  background:rgba(9,18,31,.97);
  border:1px solid rgba(214,171,72,.45);
  box-shadow:0 14px 40px rgba(0,0,0,.28);
  color:#fff;
  direction:rtl;
  backdrop-filter:blur(14px);
}

body.mahed-live-edit .mahed-visual-save-title{
  color:#f2d17c;
  font-size:12px;
  font-weight:900;
}

body.mahed-live-edit .mahed-visual-save-actions{
  display:flex;
  gap:6px;
}

body.mahed-live-edit .mahed-visual-save-actions button{
  border:1px solid rgba(255,255,255,.13);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:9px;
  padding:7px 10px;
  cursor:pointer;
  font:800 11px/1 inherit;
}

body.mahed-live-edit .mahed-visual-save-actions button:first-child{
  background:rgba(214,171,72,.18);
  color:#f2d17c;
  border-color:rgba(214,171,72,.45);
}

@media(max-width:700px){
  body.mahed-live-edit #mahedVisualSaveBar{
    top:8px;
    width:calc(100vw - 12px);
    max-width:560px;
    flex-direction:column;
    gap:7px;
    padding:8px;
  }

  body.mahed-live-edit .mahed-visual-save-actions{
    width:100%;
  }

  body.mahed-live-edit .mahed-visual-save-actions button{
    flex:1;
    font-size:10px;
  }
}


/* =========================================================
   MAHED LIVE VISUAL EDITOR — FINAL UI
   ========================================================= */
body.mahed-live-edit #mahedVisualEditor{
  position:absolute;
  z-index:2147483000;
  display:none;
  min-width:310px;
  padding:8px;
  background:rgba(8,17,29,.98);
  border:1px solid rgba(218,177,75,.55);
  border-radius:14px;
  box-shadow:0 18px 55px rgba(0,0,0,.35);
  direction:rtl;
  pointer-events:auto;
}

body.mahed-live-edit .mahed-ve-title{
  color:#f2d27d;
  font-size:11px;
  font-weight:900;
  padding:3px 6px 7px;
}

body.mahed-live-edit .mahed-ve-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

body.mahed-live-edit .mahed-ve-actions button{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.065);
  color:#fff;
  border-radius:9px;
  padding:8px 9px;
  font:800 11px/1 inherit;
  cursor:pointer;
}

body.mahed-live-edit .mahed-ve-actions [data-ve="edit"]{
  color:#f4d985;
  border-color:rgba(218,177,75,.45);
  background:rgba(218,177,75,.14);
}

body.mahed-live-edit .mahed-ve-actions [data-ve="restore"]{
  color:#bfe8c8;
}

body.mahed-live-edit .mahed-ve-actions [data-ve="delete"]{
  color:#ffb4b4;
}

body.mahed-live-edit .mahed-ve-actions button:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.12);
}

body.mahed-live-edit .mahed-ve-selected{
  outline:2px solid rgba(218,177,75,.95)!important;
  outline-offset:4px!important;
  box-shadow:0 0 0 6px rgba(218,177,75,.13)!important;
  cursor:pointer!important;
}

body.mahed-live-edit #mahedVisualSaveBar{
  position:fixed;
  z-index:2147482999;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  display:none;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(7,15,27,.97);
  border:1px solid rgba(218,177,75,.48);
  box-shadow:0 15px 45px rgba(0,0,0,.28);
  direction:rtl;
}

body.mahed-live-edit #mahedVisualSaveBar strong{
  color:#f1d17d;
  font-size:12px;
}

body.mahed-live-edit #mahedVisualSaveBar button{
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  background:rgba(255,255,255,.06);
  border-radius:9px;
  padding:8px 10px;
  font:800 11px/1 inherit;
  cursor:pointer;
}

body.mahed-live-edit #mahedVisualSaveBar button:first-of-type{
  color:#f4d985;
  background:rgba(218,177,75,.15);
  border-color:rgba(218,177,75,.4);
}

.mahed-ve-final-dialog{
  width:min(720px,calc(100vw - 24px));
  max-height:calc(100vh - 30px);
  overflow:auto;
}

.mahed-ve-page-box{
  margin-top:15px;
  padding:14px;
  border-radius:13px;
  border:1px solid rgba(218,177,75,.23);
  background:rgba(218,177,75,.055);
}

.mahed-ve-page-box strong{
  display:block;
  color:#e9c96c;
  margin-bottom:10px;
}

.mahed-ve-page-box input{
  width:100%;
  margin-bottom:8px;
}

@media(max-width:700px){
  body.mahed-live-edit #mahedVisualSaveBar{
    top:7px;
    width:calc(100vw - 14px);
    max-width:560px;
    flex-wrap:wrap;
    justify-content:center;
  }

  body.mahed-live-edit #mahedVisualSaveBar strong{
    width:100%;
    text-align:center;
  }

  body.mahed-live-edit #mahedVisualSaveBar button{
    flex:1;
    min-width:0;
    font-size:10px;
  }

  body.mahed-live-edit #mahedVisualEditor{
    min-width:250px;
    max-width:calc(100vw - 14px);
  }

  body.mahed-live-edit .mahed-ve-actions button{
    flex:1;
  }
}

/* FINAL VISUAL EDITOR CLICK FIX */
body.mahed-live-edit #mahedVisualEditorFinal{
  position:absolute;
  z-index:2147483640;
  display:none;
  min-width:310px;
  padding:8px;
  background:rgba(8,17,29,.98);
  border:1px solid rgba(218,177,75,.55);
  border-radius:14px;
  box-shadow:0 18px 55px rgba(0,0,0,.35);
  direction:rtl;
  pointer-events:auto;
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-title{
  color:#f2d27d;
  font-size:11px;
  font-weight:900;
  padding:3px 6px 7px;
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-actions button{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.07);
  color:#fff;
  border-radius:9px;
  padding:8px 10px;
  cursor:pointer;
  font:800 11px/1 inherit;
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-actions [data-ve="edit"]{
  color:#f4d985;
  border-color:rgba(218,177,75,.45);
  background:rgba(218,177,75,.14);
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-actions [data-ve="restore"]{
  color:#bfe8c8;
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-actions [data-ve="delete"]{
  color:#ffb4b4;
}

body.mahed-live-edit #mahedVisualEditorFinal .mahed-ve-actions button:hover{
  background:rgba(255,255,255,.14);
  transform:translateY(-1px);
}

/* MAHED LIVE EDITOR FINAL POSITION FIX */
#mahedVisualEditorFinal{
  position:absolute !important;
  z-index:2147483000 !important;
  display:none;
  direction:rtl;
  box-sizing:border-box;
  width:max-content;
  max-width:min(96vw,360px);
  background:rgba(20,20,20,.96);
  border:1px solid rgba(212,175,55,.65);
  border-radius:14px;
  padding:8px;
  box-shadow:0 14px 40px rgba(0,0,0,.28);
}

#mahedVisualEditorFinal .mahed-ve-title{
  font-size:12px;
  font-weight:800;
  padding:4px 7px 7px;
  color:#e8c96a;
}

#mahedVisualEditorFinal .mahed-ve-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

#mahedVisualEditorFinal .mahed-ve-actions button{
  border:0;
  border-radius:9px;
  padding:7px 10px;
  cursor:pointer;
  font:inherit;
  font-size:12px;
  background:#2a2a2a;
  color:#fff;
}

#mahedVisualEditorFinal .mahed-ve-actions button:hover{
  background:#3a3a3a;
}

#mahedVisualEditorFinal .mahed-ve-actions [data-ve="edit"]{
  background:#d4af37;
  color:#111;
  font-weight:800;
}

body.mahed-live-edit *{
  scroll-margin-top:90px;
}


/* FINAL: live editor floating toolbar must be viewport-fixed */
#mahedVisualEditorFinal{
  position:fixed !important;
  top:55px !important;
  left:8px !important;
  right:auto !important;
  bottom:auto !important;
  z-index:2147483647 !important;
  display:none;
  width:max-content !important;
  max-width:calc(100vw - 16px) !important;
  box-sizing:border-box !important;
}

#mahedVisualEditorFinal .mahed-ve-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:6px !important;
}

#mahedVisualEditorFinal button{
  position:relative !important;
  z-index:2147483648 !important;
  pointer-events:auto !important;
}


/* FINAL: universal visual editor modal */
#mahedUniversalEditModal{
  position:fixed !important;
  inset:0 !important;
  z-index:2147483646 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100vw !important;
  height:100vh !important;
  margin:0 !important;
  padding:20px !important;
  box-sizing:border-box !important;
  direction:rtl !important;
}

#mahedUniversalEditModal .mahed-live-backdrop{
  position:absolute !important;
  inset:0 !important;
  background:rgba(0,0,0,.58) !important;
  backdrop-filter:blur(5px) !important;
}

#mahedUniversalEditModal .mahed-live-dialog{
  position:relative !important;
  z-index:1 !important;
  width:min(720px,96vw) !important;
  max-height:min(86vh,760px) !important;
  overflow:auto !important;
  margin:0 auto !important;
  padding:20px !important;
  border-radius:20px !important;
  background:#101722 !important;
  color:#fff !important;
  border:1px solid rgba(218,177,75,.45) !important;
  box-shadow:0 25px 90px rgba(0,0,0,.45) !important;
  box-sizing:border-box !important;
}

#mahedUniversalEditModal .mahed-live-dialog-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom:16px !important;
}

#mahedUniversalEditModal .mahed-live-dialog-head button{
  width:38px !important;
  height:38px !important;
  border:0 !important;
  border-radius:10px !important;
  cursor:pointer !important;
}

#mahedUniversalEditModal .field{
  margin:14px 0 !important;
}

#mahedUniversalEditModal .field label{
  display:block !important;
  margin-bottom:7px !important;
  font-weight:800 !important;
}

#mahedUniversalEditModal textarea,
#mahedUniversalEditModal input{
  width:100% !important;
  box-sizing:border-box !important;
  padding:11px 12px !important;
  border-radius:11px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  background:rgba(255,255,255,.06) !important;
  color:#fff !important;
  font:inherit !important;
}

#mahedUniversalEditModal textarea{
  resize:vertical !important;
  min-height:150px !important;
}

#mahedUniversalEditModal .mahed-live-dialog-actions{
  display:flex !important;
  gap:10px !important;
  justify-content:flex-start !important;
  margin-top:18px !important;
}

@media(max-width:600px){
  #mahedUniversalEditModal{
    padding:10px !important;
  }

  #mahedUniversalEditModal .mahed-live-dialog{
    width:100% !important;
    max-height:92vh !important;
    border-radius:16px !important;
    padding:15px !important;
  }
}


/* =========================================================
   MAHED REAL PAGES
   ========================================================= */

.mahed-dedicated-page{
  min-height:calc(100vh - 90px);
  background:var(--bg);
  direction:rtl;
}

.mahed-page-hero{
  padding:90px 20px 55px;
  background:
    radial-gradient(circle at 15% 20%,rgba(198,168,93,.14),transparent 35%),
    radial-gradient(circle at 85% 15%,rgba(25,65,130,.12),transparent 32%);
}

.mahed-page-hero-inner{
  width:min(1120px,100%);
  margin:auto;
  text-align:center;
}

.mahed-page-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 15px;
  border-radius:999px;
  background:rgba(198,168,93,.11);
  color:var(--gold);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}

.mahed-page-hero h1{
  margin:18px 0 0;
  font-size:clamp(30px,5vw,58px);
  line-height:1.15;
  color:var(--ink);
}

.mahed-page-line{
  width:90px;
  height:4px;
  margin:22px auto 0;
  border-radius:999px;
  background:var(--gold);
}

.mahed-page-content{
  padding:0 20px 85px;
}

.mahed-page-container{
  width:min(1120px,100%);
  margin:auto;
}

.mahed-page-intro{
  max-width:760px;
  margin:0 auto 38px;
  text-align:center;
  color:var(--muted);
  font-size:16px;
  line-height:2;
}

.mahed-page-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

.mahed-page-card{
  overflow:hidden;
  border:1px solid rgba(20,35,65,.08);
  border-radius:24px;
  background:var(--card,#fff);
  box-shadow:0 14px 35px rgba(15,30,60,.07);
}

.mahed-page-card-media{
  min-height:210px;
  background:linear-gradient(135deg,rgba(13,47,110,.06),rgba(198,168,93,.08));
}

.mahed-page-card-media img{
  display:block;
  width:100%;
  height:220px;
  object-fit:cover;
}

.mahed-page-card-icon{
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:70px;
}

.mahed-page-card-body{
  padding:22px;
}

.mahed-page-card-body h3{
  margin:10px 0;
  color:var(--ink);
  font-size:21px;
}

.mahed-page-card-body p,
.mahed-page-card-text{
  margin:0;
  color:var(--muted);
  line-height:1.9;
}

.mahed-page-card-text{
  margin-top:10px;
  font-size:14px;
}

.mahed-page-card-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:17px;
  color:var(--muted);
  font-size:12px;
}

.mahed-page-card-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:22px;
}

.mahed-page-card-bottom strong{
  color:var(--gold);
  font-size:17px;
}

.mahed-page-card-bottom > div{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.mahed-page-stock{
  margin-top:15px;
  color:var(--muted);
  font-size:13px;
}

.mahed-page-stock.is-out{
  color:var(--red);
}

.mahed-page-teacher-head{
  display:flex;
  align-items:center;
  gap:15px;
}

.mahed-page-teacher-head img,
.mahed-page-teacher-avatar{
  width:72px;
  height:72px;
  border-radius:50%;
  flex:none;
  object-fit:cover;
}

.mahed-page-teacher-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--navy,#0d2f6e);
  color:#fff;
  font-size:28px;
  font-weight:800;
}

.mahed-page-teacher-head span{
  display:block;
  color:var(--gold);
  font-size:12px;
  font-weight:800;
}

.mahed-page-teacher-head h3{
  margin:4px 0;
}

.mahed-page-teacher-head small{
  color:var(--muted);
}

.mahed-page-teacher-bio{
  margin-top:18px !important;
  font-size:14px;
}

.mahed-page-teacher-stats{
  display:flex;
  gap:12px;
  margin-top:18px;
}

.mahed-page-teacher-stats span{
  padding:8px 12px;
  border-radius:12px;
  background:rgba(13,47,110,.05);
  color:var(--muted);
  font-size:12px;
}

.mahed-page-teacher-stats b{
  color:var(--ink);
}

.mahed-page-mini-list{
  display:grid;
  gap:8px;
  margin-top:18px;
}

.mahed-page-mini-list button{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  padding:11px 13px;
  border:1px solid rgba(20,35,65,.08);
  border-radius:12px;
  background:transparent;
  color:var(--ink);
  cursor:pointer;
  text-align:right;
}

.mahed-page-empty{
  grid-column:1/-1;
  padding:50px 20px;
  border-radius:22px;
  background:rgba(13,47,110,.04);
  text-align:center;
  color:var(--muted);
}

.mahed-live-page-status{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:45px;
  padding:22px;
  border-radius:22px;
  border:1px solid rgba(20,35,65,.08);
  background:#fff;
  box-shadow:0 14px 35px rgba(15,30,60,.06);
}

.mahed-live-page-status > div:nth-child(2){
  flex:1;
}

.mahed-live-page-status strong{
  color:var(--ink);
}

.mahed-live-page-status p{
  margin:7px 0 0;
  color:var(--muted);
  line-height:1.8;
}

.mahed-live-page-dot{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#9aa2af;
  flex:none;
}

.mahed-live-page-status.is-live .mahed-live-page-dot{
  background:#e54646;
  box-shadow:0 0 0 7px rgba(229,70,70,.12);
}

.mahed-page-section-heading{
  margin-bottom:20px;
}

.mahed-page-section-heading span{
  color:var(--gold);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}

.mahed-page-section-heading h2{
  margin:7px 0 0;
  color:var(--ink);
}

.mahed-page-live-list{
  display:grid;
  gap:14px;
}

.mahed-live-class-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:20px;
  border:1px solid rgba(20,35,65,.08);
  border-radius:20px;
  background:#fff;
}

.mahed-live-class-row h3{
  margin:7px 0 4px;
}

.mahed-live-class-row p{
  margin:0;
  color:var(--muted);
}

.mahed-live-class-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  color:var(--muted);
  font-size:13px;
}

body.mahed-dedicated-mode .hero,
body.mahed-dedicated-mode #dynamicSections,
body.mahed-dedicated-mode #courses,
body.mahed-dedicated-mode #books,
body.mahed-dedicated-mode #teachers,
body.mahed-dedicated-mode #blog,
body.mahed-dedicated-mode #placementCtaSection,
body.mahed-dedicated-mode #liveSec{
  display:none !important;
}

@media (max-width:900px){
  .mahed-page-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .mahed-live-class-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .mahed-live-class-meta{
    justify-content:flex-start;
  }
}

@media (max-width:640px){
  .mahed-page-hero{
    padding:65px 16px 40px;
  }

  .mahed-page-content{
    padding:0 14px 60px;
  }

  .mahed-page-grid{
    grid-template-columns:1fr;
    gap:15px;
  }

  .mahed-page-card{
    border-radius:20px;
  }

  .mahed-page-card-body{
    padding:18px;
  }

  .mahed-page-card-bottom{
    align-items:flex-start;
    flex-direction:column;
  }

  .mahed-page-card-bottom > div{
    width:100%;
  }

  .mahed-page-card-bottom .btn{
    flex:1;
  }

  .mahed-live-page-status{
    align-items:flex-start;
    flex-wrap:wrap;
    padding:18px;
  }

  .mahed-live-page-status .btn{
    width:100%;
  }

  .mahed-live-class-row{
    padding:17px;
  }
}


/* =========================================================
   MAHED DEDICATED CONTENT PAGES
   ========================================================= */

.mahed-content-page{
  max-width:1000px;
  margin:auto;
}

.mahed-content-intro{
  max-width:780px;
  margin:0 auto 32px;
  text-align:center;
}

.mahed-content-intro p,
.mahed-content-copy p{
  color:var(--muted);
  font-size:16px;
  line-height:2.15;
}

.mahed-content-visual{
  position:relative;
  overflow:hidden;
  margin:0 auto 34px;
  border-radius:28px;
  min-height:320px;
  box-shadow:0 20px 55px rgba(12,30,60,.10);
}

.mahed-content-visual img{
  width:100%;
  height:400px;
  display:block;
  object-fit:cover;
}

.mahed-content-visual>div{
  position:absolute;
  inset:auto 0 0;
  padding:70px 28px 28px;
  background:linear-gradient(transparent,rgba(0,0,0,.72));
  color:#fff;
}

.mahed-content-visual span{
  display:block;
  color:#e7cf8e;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  margin-bottom:8px;
}

.mahed-content-visual strong{
  font-size:clamp(22px,4vw,34px);
}

.mahed-content-copy{
  max-width:820px;
  margin:0 auto;
  padding:30px;
  border-radius:24px;
  background:#fff;
  border:1px solid rgba(20,35,65,.08);
  box-shadow:0 14px 40px rgba(15,30,60,.05);
}

.mahed-page-cta{
  display:inline-flex;
  margin-top:22px;
  text-decoration:none;
}

.mahed-content-block{
  margin-top:55px;
}

.mahed-content-section-head{
  margin-bottom:22px;
  text-align:center;
}

.mahed-content-section-head span{
  color:var(--gold);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}

.mahed-content-section-head h2{
  margin:7px 0 0;
  color:var(--ink);
}

.mahed-expression-grid,
.mahed-benefits-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.mahed-expression-card,
.mahed-benefit-card{
  border:1px solid rgba(20,35,65,.08);
  border-radius:20px;
  padding:22px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,30,60,.05);
}

.mahed-expression-card strong{
  display:block;
  color:var(--ink);
  font-size:20px;
  direction:ltr;
  text-align:left;
}

.mahed-expression-card span{
  display:block;
  margin-top:8px;
  color:var(--gold);
  font-weight:700;
}

.mahed-expression-card p{
  margin:14px 0 0;
  color:var(--muted);
  direction:ltr;
  text-align:left;
  line-height:1.8;
}

.mahed-benefit-card{
  display:flex;
  align-items:center;
  gap:14px;
}

.mahed-benefit-card b{
  width:42px;
  height:42px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  background:rgba(198,168,93,.12);
  color:var(--gold);
}

.mahed-benefit-card span{
  color:var(--ink);
  line-height:1.8;
}

@media (max-width:760px){
  .mahed-content-visual img{
    height:280px;
  }

  .mahed-content-copy{
    padding:21px;
  }

  .mahed-expression-grid,
  .mahed-benefits-grid{
    grid-template-columns:1fr;
  }
}


/* MAHED DEDICATED CONTENT MANAGER */
.mahed-pages-manager{
  max-width:1100px;
  margin:0 auto;
}
.mahed-pages-manager-head{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
  padding:22px;
}
.mahed-pages-manager-icon{
  font-size:34px;
}
.mahed-pages-manager-head h2{
  margin:0 0 6px;
}
.mahed-pages-manager-head p{
  margin:0;
  color:var(--muted);
  line-height:1.9;
}
.mahed-admin-page-card{
  margin-bottom:16px;
  padding:22px;
}
.mahed-admin-page-card-head,
.mahed-page-item-top,
.mahed-items-head,
.mahed-page-save-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.mahed-admin-page-title{
  display:flex;
  align-items:center;
  gap:10px;
}
.mahed-admin-page-title>span{
  font-size:28px;
}
.mahed-admin-page-title h3{
  margin:0 0 4px;
}
.mahed-admin-page-title small{
  color:var(--muted);
}
.mahed-page-basic-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.mahed-upload-box{
  border:1px dashed var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,.03);
}
.mahed-upload-preview{
  min-height:170px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:rgba(0,0,0,.04);
  margin-bottom:10px;
}
.mahed-upload-preview img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
}
.mahed-upload-preview span{
  color:var(--muted);
}
.mahed-upload-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.mahed-items-head{
  margin:24px 0 12px;
}
.mahed-items-head h4{
  margin:0 0 4px;
}
.mahed-items-head small{
  color:var(--muted);
}
.mahed-page-items{
  display:grid;
  gap:12px;
}
.mahed-page-item-card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  background:rgba(255,255,255,.02);
}
.mahed-page-item-top{
  margin-bottom:12px;
}
.mahed-check{
  display:flex;
  align-items:center;
  gap:7px;
  cursor:pointer;
}
.mahed-items-empty{
  border:1px dashed var(--line);
  border-radius:14px;
  padding:24px;
  text-align:center;
  color:var(--muted);
}
.mahed-page-save-row{
  justify-content:flex-end;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
}
.mahed-collection-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.mahed-collection-card{
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  border-radius:22px;
  background:var(--card,#fff);
}
.mahed-collection-image{
  aspect-ratio:16/9;
  overflow:hidden;
}
.mahed-collection-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.mahed-collection-content{
  padding:18px;
}
.mahed-collection-content h3{
  margin:8px 0;
}
.mahed-collection-content p{
  color:var(--muted);
  line-height:1.9;
}
.mahed-card-kicker{
  font-size:12px;
  color:var(--gold);
  font-weight:800;
}
.mahed-card-meta{
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}
.mahed-collection-content audio{
  width:100%;
  margin-top:10px;
}
.mahed-collection-content details{
  margin-top:12px;
}
.mahed-collection-content summary{
  cursor:pointer;
  font-weight:700;
}
.mahed-rich-text{
  white-space:pre-line;
  color:var(--muted);
  line-height:2;
  padding-top:10px;
}
@media (max-width:800px){
  .mahed-page-basic-grid,
  .mahed-collection-grid{
    grid-template-columns:1fr;
  }
  .mahed-admin-page-card,
  .mahed-pages-manager-head{
    padding:16px;
  }
  .mahed-admin-page-card-head,
  .mahed-items-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .mahed-upload-preview img{
    height:180px;
  }
}

.mahed-media-upload-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
}
.mahed-media-file-name{
  color:var(--muted);
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:360px;
}
.mahed-podcast-player{
  margin-top:12px;
}
.mahed-podcast-player>span{
  display:block;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  margin-bottom:6px;
}
.mahed-podcast-player audio{
  width:100%;
}
.mahed-podcast-player video{
  display:block;
  width:100%;
  max-height:420px;
  border-radius:14px;
  background:#000;
}
@media (max-width:800px){
  .mahed-media-file-name{
    width:100%;
    max-width:none;
  }
}

/* MAGAZINE ARTICLE */
.mahed-magazine-card h3 a{
  color:inherit;
  text-decoration:none;
}
.mahed-magazine-card h3 a:hover{
  text-decoration:underline;
}
.mahed-magazine-article{
  max-width:900px;
  margin:0 auto;
}
.mahed-back-magazine{
  margin-bottom:18px;
}
.mahed-magazine-article-cover{
  width:100%;
  overflow:hidden;
  border-radius:24px;
  margin-bottom:24px;
}
.mahed-magazine-article-cover img{
  width:100%;
  display:block;
  max-height:560px;
  object-fit:cover;
}
.mahed-magazine-article-title{
  font-size:clamp(28px,4vw,48px);
  line-height:1.35;
  margin:10px 0 16px;
}
.mahed-magazine-article-excerpt{
  font-size:18px;
  line-height:2;
  color:var(--muted);
  margin-bottom:24px;
}
.mahed-magazine-article-body{
  white-space:pre-line;
  font-size:17px;
  line-height:2.15;
}
@media (max-width:700px){
  .mahed-magazine-article-title{
    font-size:28px;
  }
  .mahed-magazine-article-excerpt,
  .mahed-magazine-article-body{
    font-size:15px;
    line-height:2;
  }
  .mahed-magazine-article-cover{
    border-radius:16px;
  }
}

/* =========================================================
   MAHED MAGAZINE — FINAL CARD FIX
   ========================================================= */

.mahed-magazine-card{
  display:flex !important;
  flex-direction:column !important;
  height:100%;
  min-height:0;
  overflow:hidden !important;
  border-radius:24px !important;
  background:var(--card,#fff) !important;
  border:1px solid var(--line) !important;
}

.mahed-magazine-card .mahed-collection-image{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:4 / 3 !important;
  overflow:hidden !important;
  background:#eee;
  flex:none !important;
  border-radius:0 !important;
}

.mahed-magazine-card .mahed-collection-image img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  min-height:0 !important;
  object-fit:cover !important;
  object-position:center !important;
}

.mahed-magazine-card .mahed-collection-content{
  display:flex !important;
  flex-direction:column !important;
  flex:1 1 auto !important;
  padding:20px !important;
}

.mahed-magazine-card .mahed-card-kicker{
  display:block !important;
  margin-bottom:8px !important;
}

.mahed-magazine-card .mahed-collection-content h3{
  display:block !important;
  margin:0 0 12px !important;
  padding:0 !important;
  font-size:20px !important;
  line-height:1.7 !important;
  font-weight:900 !important;
  color:var(--text,#171717) !important;
}

.mahed-magazine-card .mahed-collection-content h3 a{
  display:block !important;
  color:inherit !important;
  text-decoration:none !important;
  visibility:visible !important;
  opacity:1 !important;
}

.mahed-magazine-card .mahed-collection-content h3 a:hover{
  color:var(--gold,#c9a227) !important;
}

.mahed-magazine-card .mahed-collection-content p{
  display:block !important;
  margin:0 0 18px !important;
  color:var(--muted) !important;
  font-size:14px !important;
  line-height:1.95 !important;
}

.mahed-magazine-card .mahed-collection-content .btn{
  margin-top:auto !important;
  align-self:flex-start !important;
}

@media (max-width:800px){
  .mahed-magazine-card .mahed-collection-image{
    aspect-ratio:1 / 1 !important;
  }

  .mahed-magazine-card .mahed-collection-content{
    padding:16px !important;
  }

  .mahed-magazine-card .mahed-collection-content h3{
    font-size:18px !important;
    line-height:1.65 !important;
  }
}

[data-theme="dark"] .mahed-magazine-card{
  background:var(--card,#171717) !important;
  border-color:var(--line) !important;
}


/* =========================================================
   MAHED MAGAZINE — FINAL CARD FIX
   ========================================================= */

.mahed-magazine-card{
  display:flex !important;
  flex-direction:column !important;
  height:100%;
  min-height:0;
  overflow:hidden !important;
  border-radius:24px !important;
  background:var(--card,#fff) !important;
  border:1px solid var(--line) !important;
}

.mahed-magazine-card .mahed-collection-image{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:4 / 3 !important;
  overflow:hidden !important;
  background:#eee;
  flex:none !important;
  border-radius:0 !important;
}

.mahed-magazine-card .mahed-collection-image img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  min-height:0 !important;
  object-fit:cover !important;
  object-position:center !important;
}

.mahed-magazine-card .mahed-collection-content{
  display:flex !important;
  flex-direction:column !important;
  flex:1 1 auto !important;
  padding:20px !important;
}

.mahed-magazine-card .mahed-card-kicker{
  display:block !important;
  margin-bottom:8px !important;
}

.mahed-magazine-card .mahed-collection-content h3{
  display:block !important;
  margin:0 0 12px !important;
  padding:0 !important;
  font-size:20px !important;
  line-height:1.7 !important;
  font-weight:900 !important;
  color:var(--text,#171717) !important;
}

.mahed-magazine-card .mahed-collection-content h3 a{
  display:block !important;
  color:inherit !important;
  text-decoration:none !important;
  visibility:visible !important;
  opacity:1 !important;
}

.mahed-magazine-card .mahed-collection-content h3 a:hover{
  color:var(--gold,#c9a227) !important;
}

.mahed-magazine-card .mahed-collection-content p{
  display:block !important;
  margin:0 0 18px !important;
  color:var(--muted) !important;
  font-size:14px !important;
  line-height:1.95 !important;
}

.mahed-magazine-card .mahed-collection-content .btn{
  margin-top:auto !important;
  align-self:flex-start !important;
}

@media (max-width:800px){
  .mahed-magazine-card .mahed-collection-image{
    aspect-ratio:1 / 1 !important;
  }

  .mahed-magazine-card .mahed-collection-content{
    padding:16px !important;
  }

  .mahed-magazine-card .mahed-collection-content h3{
    font-size:18px !important;
    line-height:1.65 !important;
  }
}

[data-theme="dark"] .mahed-magazine-card{
  background:var(--card,#171717) !important;
  border-color:var(--line) !important;
}


/* ================================
   PAGES MANAGER - ADD BUTTON POSITION
   ================================ */

.mahed-items-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px !important;
  width:100% !important;
}

.mahed-items-head > div:first-child{
  flex:1 1 auto !important;
}

.mahed-items-head > .btn,
.mahed-items-head > button{
  flex:0 0 auto !important;
  margin:0 !important;
  align-self:center !important;
}

@media (max-width:800px){
  .mahed-items-head{
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
  }

  .mahed-items-head > .btn,
  .mahed-items-head > button{
    width:auto !important;
    margin:0 !important;
  }
}

/* ===== MAHED PAGES ITEMS LAYOUT ===== */

.mahed-items-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  gap:16px !important;
  margin-bottom:18px !important;
}

.mahed-page-items{
  display:grid !important;
  grid-template-columns:1fr !important;
  width:100% !important;
  gap:16px !important;
  clear:both !important;
  margin-top:8px !important;
}

.mahed-page-items > *{
  width:100% !important;
}

.mahed-items-empty{
  width:100% !important;
  margin-top:8px !important;
}

@media (max-width:800px){
  .mahed-items-head{
    flex-direction:row !important;
    align-items:center !important;
  }

  .mahed-page-items{
    grid-template-columns:1fr !important;
  }
}

/* ===== CLEAN PAGE ITEMS HEADER ===== */

.mahed-items-head{
  margin-top:0 !important;
  margin-bottom:14px !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
}

.mahed-items-head h4{
  margin:0 0 4px !important;
}

.mahed-items-head small{
  display:block !important;
  margin:0 !important;
  color:var(--muted) !important;
}

.mahed-page-items{
  margin-top:0 !important;
  padding-top:0 !important;
}


/* ===== EXISTING PAGE ITEMS TITLE ===== */

.mahed-existing-items-title{
  display:block !important;
  width:100% !important;
  margin:6px 0 12px !important;
  padding-top:14px !important;
  border-top:1px solid var(--line) !important;
  font-size:16px !important;
  font-weight:900 !important;
  color:var(--text,#171717) !important;
}

.mahed-page-items{
  display:grid !important;
  width:100% !important;
  grid-template-columns:1fr !important;
  gap:12px !important;
}


/* ===== ADMIN: HOME + SHOWCASE CARDS ===== */

#aSite > .two-col{
  align-items:start !important;
}

#aSite > .two-col > .card{
  height:auto !important;
  min-height:0 !important;
  align-self:start !important;
}

#aSite > .two-col > .card .field{
  margin-bottom:10px !important;
}

#aSite > .two-col > .card h3{
  margin-bottom:12px !important;
}


/* =========================================================
   ADMIN — COMPACT HOME / SHOWCASE PANELS
   ========================================================= */

#aSite > .two-col{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  align-items:start !important;
  gap:14px !important;
}

#aSite > .two-col > .card{
  width:100% !important;
  max-width:none !important;
  align-self:start !important;
  box-sizing:border-box !important;
  margin:0 !important;
  padding:18px !important;
}

#aSite > .two-col > .card .field{
  margin-bottom:9px !important;
}

#aSite > .two-col > .card textarea{
  min-height:80px;
}

@media (max-width:900px){
  #aSite > .two-col{
    grid-template-columns:1fr !important;
  }
}


/* =========================================================
   ADMIN DESIGN — FULL WIDTH UNIFIED TOP CARDS
   ========================================================= */

#aSite > .two-col{
  display:block !important;
}

#aSite > .two-col > .card{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  margin:0 0 14px 0 !important;
  box-sizing:border-box !important;
}

/* صفحه اصلی و Showcase هرکدام یک کارت کامل */
#aSite > .two-col > .card:first-child,
#aSite > .two-col > .card:nth-child(2){
  width:100% !important;
  margin-bottom:14px !important;
}

/* MAHED SAFE MOBILE HAMBURGER CSS START */

.mahed-safe-menu-btn,
.mahed-safe-menu-panel,
.mahed-safe-menu-overlay{
  display:none;
}

@media(max-width:680px){

  .mahed-header{
    position:relative !important;
    z-index:5000 !important;
  }

  .mahed-header .navbar{
    position:relative !important;
  }

  .mahed-safe-menu-btn{
    position:absolute !important;
    left:10px !important;
    top:50% !important;
    transform:translateY(-50%) !important;

    width:42px !important;
    height:42px !important;

    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    align-items:center !important;
    gap:5px !important;

    padding:0 !important;
    margin:0 !important;

    border:1px solid var(--line,rgba(0,0,0,.1)) !important;
    border-radius:12px !important;

    background:var(--card,#fff) !important;
    color:var(--ink,#171717) !important;

    z-index:5003 !important;
  }

  .mahed-safe-menu-btn span{
    width:19px !important;
    height:2px !important;
    display:block !important;
    background:currentColor !important;
    border-radius:10px !important;
  }

  .mahed-safe-menu-overlay{
    position:fixed !important;
    inset:0 !important;

    display:block !important;

    background:rgba(0,0,0,.4) !important;

    opacity:0 !important;
    visibility:hidden !important;

    transition:.25s ease !important;

    z-index:5000 !important;
  }

  .mahed-safe-menu-overlay.is-open{
    opacity:1 !important;
    visibility:visible !important;
  }

  .mahed-safe-menu-panel{
    position:fixed !important;
    top:0 !important;
    right:0 !important;

    width:min(86vw,360px) !important;
    height:100dvh !important;

    display:flex !important;
    flex-direction:column !important;

    background:var(--card,#fff) !important;
    color:var(--ink,#171717) !important;

    box-shadow:-18px 0 50px rgba(0,0,0,.16) !important;

    transform:translateX(105%) !important;
    transition:transform .28s ease !important;

    overflow:hidden !important;

    z-index:5001 !important;
  }

  .mahed-safe-menu-panel.is-open{
    transform:translateX(0) !important;
  }

  .mahed-safe-menu-top{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;

    padding:18px !important;

    border-bottom:1px solid var(--line,rgba(0,0,0,.08)) !important;
  }

  .mahed-safe-menu-top strong{
    font-size:17px !important;
    font-weight:900 !important;
  }

  .mahed-safe-menu-close{
    width:40px !important;
    height:40px !important;

    border:0 !important;
    border-radius:12px !important;

    background:rgba(0,0,0,.06) !important;

    font-size:27px !important;
    line-height:1 !important;
  }

  .mahed-safe-menu-list{
    display:flex !important;
    flex-direction:column !important;
    gap:7px !important;

    padding:14px !important;

    overflow-y:auto !important;
  }

  .mahed-safe-menu-list a{
    display:flex !important;
    align-items:center !important;

    min-height:50px !important;

    padding:11px 14px !important;

    border:1px solid var(--line,rgba(0,0,0,.07)) !important;
    border-radius:14px !important;

    background:var(--bg,#f7f7f7) !important;

    color:inherit !important;
    text-decoration:none !important;

    font-size:14px !important;
    font-weight:800 !important;
    white-space:normal !important;
  }

  body.mahed-safe-menu-open{
    overflow:hidden !important;
  }
}

/* MAHED SAFE MOBILE HAMBURGER CSS END */

@media(max-width:680px){
  .mahed-safe-menu-btn{
    left:auto !important;
    right:64px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
  }
}


@media(max-width:680px){

  .mahed-safe-menu-btn.is-hidden{
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }

  .mahed-safe-menu-top{
    min-height:74px !important;
    padding:14px 16px !important;
  }

  .mahed-safe-menu-top strong{
    font-size:18px !important;
    line-height:1.5 !important;
    margin:0 !important;
  }

  .mahed-safe-menu-close{
    flex:0 0 auto !important;
  }

  .mahed-safe-menu-list a{
    justify-content:space-between !important;
    gap:12px !important;
  }

  .mahed-safe-menu-list a span{
    display:block !important;
    flex:1 1 auto !important;
    text-align:right !important;
  }

  .mahed-safe-menu-list a b{
    display:block !important;
    flex:0 0 auto !important;
    opacity:.45 !important;
  }
}


@media(max-width:680px){
  .mahed-safe-menu-btn{
    top:calc(50% + 12px) !important;
  }
}


/* ===== BLOG DARK MODE FIX ===== */
@media (prefers-color-scheme: dark){

  [data-theme="dark"] #blog.mahed-blog-section{
    background:var(--bg) !important;
    color:var(--ink) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .sec-kicker{
    color:var(--gold) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .sec-title{
    color:var(--ink) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card{
    background:var(--card) !important;
    color:var(--ink) !important;
    border:1px solid var(--line) !important;
    box-shadow:0 20px 50px rgba(0,0,0,.28) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card h3,
  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card h3 a{
    color:var(--ink) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card p{
    color:var(--muted) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-link,
  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-more{
    color:var(--gold) !important;
  }

  [data-theme="dark"] #blog.mahed-blog-section .mahed-blog-cover{
    background:var(--surface) !important;
    border-color:var(--line) !important;
  }

}

[data-theme="dark"] #blog.mahed-blog-section{
  background:var(--bg) !important;
}

[data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card{
  background:var(--card) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}

[data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card h3,
[data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card h3 a{
  color:var(--ink) !important;
}

[data-theme="dark"] #blog.mahed-blog-section .mahed-blog-card p{
  color:var(--muted) !important;
}

[data-theme="dark"] #blog.mahed-blog-section .mahed-blog-link,
[data-theme="dark"] #blog.mahed-blog-section .mahed-blog-more{
  color:var(--gold) !important;
}


/* ===== DARK MODE FIX — STORE + RESOURCES ===== */
[data-theme="dark"] #books,
[data-theme="dark"] #resources{
  background:var(--bg) !important;
  color:var(--ink) !important;
}

[data-theme="dark"] #books .sec-kicker,
[data-theme="dark"] #resources .sec-kicker{
  color:var(--gold) !important;
}

[data-theme="dark"] #books .sec-title,
[data-theme="dark"] #resources .sec-title{
  color:var(--ink) !important;
}

/* کارت‌های فروشگاه */
[data-theme="dark"] #books .card,
[data-theme="dark"] #books .book-card,
[data-theme="dark"] #books article,
[data-theme="dark"] #books [class*="card"]{
  background:var(--card) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
  box-shadow:0 20px 50px rgba(0,0,0,.24) !important;
}

[data-theme="dark"] #books h3,
[data-theme="dark"] #books h3 a,
[data-theme="dark"] #books h4,
[data-theme="dark"] #books p{
  color:var(--ink) !important;
}

[data-theme="dark"] #books p{
  color:var(--muted) !important;
}

/* کارت‌های منابع */
[data-theme="dark"] #resources .card,
[data-theme="dark"] #resources .resource-card,
[data-theme="dark"] #resources article,
[data-theme="dark"] #resources [class*="card"]{
  background:var(--card) !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
  box-shadow:0 20px 50px rgba(0,0,0,.24) !important;
}

[data-theme="dark"] #resources h3,
[data-theme="dark"] #resources h3 a,
[data-theme="dark"] #resources h4,
[data-theme="dark"] #resources p{
  color:var(--ink) !important;
}

[data-theme="dark"] #resources p{
  color:var(--muted) !important;
}

/* متن و لینک‌های طلایی */
[data-theme="dark"] #books a,
[data-theme="dark"] #resources a{
  color:var(--gold);
}

[data-theme="dark"] #books .btn,
[data-theme="dark"] #resources .btn{
  color:inherit;
}


/* ===== MAHED PLACEMENT TEST ===== */
.mahed-placement-page{
  max-width:980px;
  margin:0 auto;
  padding:10px 0 60px;
}

.mahed-placement-intro{
  text-align:center;
  max-width:780px;
  margin:0 auto 28px;
}

.mahed-placement-intro h1{
  margin:10px 0;
  color:var(--text,var(--ink));
  font-size:34px;
  line-height:1.5;
}

.mahed-placement-intro p{
  color:var(--muted);
  line-height:2;
  margin:0 auto 14px;
  font-size:14px;
}

.mahed-placement-note{
  display:inline-block;
  padding:10px 14px;
  border-radius:14px;
  background:rgba(211,158,74,.10);
  color:var(--ink);
  font-weight:800;
  font-size:12px;
}

.mahed-placement-box{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:26px;
  padding:22px;
  box-shadow:var(--shadow);
}

.mahed-placement-progress{
  display:flex;
  flex-direction:column;
  gap:9px;
  margin-bottom:24px;
}

.mahed-placement-progress span{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.mahed-placement-progress>div{
  width:100%;
  height:7px;
  border-radius:99px;
  overflow:hidden;
  background:var(--surface);
}

.mahed-placement-progress i{
  display:block;
  height:100%;
  width:0;
  background:var(--gold);
  transition:width .25s ease;
}

.mahed-placement-question{
  min-height:330px;
  padding:14px 0;
}

.mahed-placement-q-level{
  display:inline-flex;
  padding:6px 10px;
  border-radius:10px;
  background:rgba(211,158,74,.12);
  color:var(--gold);
  font-size:11px;
  font-weight:900;
}

.mahed-placement-question h2{
  margin:16px 0 22px;
  color:var(--ink);
  font-size:22px;
  line-height:1.7;
}

.mahed-placement-options{
  display:grid;
  gap:11px;
}

.mahed-placement-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 15px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--bg);
  color:var(--ink);
  cursor:pointer;
  transition:border-color .2s,background .2s,transform .2s;
}

.mahed-placement-option:hover{
  border-color:rgba(211,158,74,.55);
  background:var(--surface);
}

.mahed-placement-option input{
  accent-color:var(--gold);
}

.mahed-placement-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:20px;
}

.mahed-placement-result{
  text-align:center;
  padding:15px 5px 10px;
}

.mahed-placement-result-level{
  display:flex;
  align-items:center;
  justify-content:center;
  width:110px;
  height:110px;
  margin:18px auto;
  border-radius:32px;
  background:linear-gradient(135deg,var(--gold),var(--gold-d));
  color:#fff;
  font-size:34px;
  font-weight:1000;
  box-shadow:0 18px 40px rgba(232,95,0,.22);
}

.mahed-placement-result h2{
  color:var(--ink);
  margin:0 0 10px;
}

.mahed-placement-result p{
  color:var(--muted);
  line-height:2;
}

.mahed-placement-course{
  max-width:600px;
  margin:24px auto;
  padding:20px;
  text-align:right;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--bg);
}

.mahed-placement-course>span{
  color:var(--gold);
  font-size:11px;
  font-weight:900;
}

.mahed-placement-course h3{
  color:var(--ink);
  margin:8px 0;
  font-size:20px;
}

.mahed-placement-course small{
  color:var(--muted);
}

.mahed-placement-course p{
  margin:10px 0 16px;
}

[data-theme="dark"] .mahed-placement-page{
  color:var(--ink);
}

[data-theme="dark"] .mahed-placement-box,
[data-theme="dark"] .mahed-placement-course{
  background:var(--card);
  border-color:var(--line);
}

@media(max-width:680px){
  .mahed-placement-page{
    padding:4px 0 40px;
  }

  .mahed-placement-intro h1{
    font-size:25px;
  }

  .mahed-placement-intro p{
    font-size:13px;
  }

  .mahed-placement-box{
    padding:16px;
    border-radius:20px;
  }

  .mahed-placement-question{
    min-height:360px;
  }

  .mahed-placement-question h2{
    font-size:18px;
  }

  .mahed-placement-actions{
    position:sticky;
    bottom:8px;
    padding-top:10px;
    background:var(--card);
  }
}


/* ===== FOOTER MOBILE — FINAL CLEAN FIX ===== */
@media (max-width:680px){

  footer{
    overflow:hidden !important;
  }

  /* تمام ردیف‌های دو ستونه Footer */
  footer .two-col,
  footer .footer-grid,
  footer .footer-columns{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:28px !important;
    width:100% !important;
  }

  /* هر ستون Footer کامل یک ردیف باشد */
  footer .two-col > *,
  footer .footer-grid > *,
  footer .footer-columns > *{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  /* عنوان ستون‌ها */
  footer h3,
  footer h4{
    margin:0 0 12px !important;
    line-height:1.8 !important;
  }

  /* لیست لینک‌ها */
  footer ul{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    list-style:none !important;
  }

  footer li{
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    line-height:1.8 !important;
  }

  footer li a,
  footer .two-col a,
  footer .footer-grid a,
  footer .footer-columns a{
    display:block !important;
    width:100% !important;
    padding:3px 0 !important;
    line-height:1.9 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  /* فاصله بین بخش‌های Footer */
  footer .two-col{
    margin-bottom:18px !important;
  }

  /* پشتیبانی */
  footer .contact,
  footer .support,
  footer [class*="contact"],
  footer [class*="support"]{
    width:100% !important;
    max-width:100% !important;
  }

  /* جلوگیری از چسبیدن عناصر کنار هم */
  footer .social,
  footer .socials,
  footer .footer-social{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
  }

  footer .social a,
  footer .socials a,
  footer .footer-social a{
    width:auto !important;
  }

}


/* ===== MAHED FOOTER MOBILE — REAL STRUCTURE FIX ===== */
@media (max-width:680px){

  .mahed-footer-main{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:30px !important;
    width:100% !important;
  }

  .mahed-footer-brand{
    grid-column:1 !important;
    width:100% !important;
  }

  .mahed-footer-col{
    width:100% !important;
    min-width:0 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:11px !important;
  }

  .mahed-footer-col h3{
    margin:0 0 8px !important;
    line-height:1.8 !important;
  }

  .mahed-footer-col a{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding:2px 0 !important;
    line-height:2 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
  }

  .mahed-footer-contact{
    width:100% !important;
    gap:16px !important;
  }

  .mahed-footer-contact > div{
    width:100% !important;
    max-width:100% !important;
  }

  .mahed-footer-test-link{
    display:inline-flex !important;
    white-space:normal !important;
    line-height:1.8 !important;
  }

  .mahed-footer-bottom{
    width:100% !important;
    text-align:right !important;
    line-height:1.9 !important;
  }

}


/* =========================================================
   FINAL LIGHT MODE FIX — PLACEMENT CTA + FOOTER
   Dark mode remains unchanged
   ========================================================= */

html:not([data-theme="dark"]) .mahed-placement-cta{
  background:linear-gradient(135deg,#f8f8f8,#ffffff)!important;
  color:var(--ink)!important;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

html:not([data-theme="dark"]) .mahed-placement-inner{
  background:rgba(255,255,255,.92)!important;
  border-color:var(--line)!important;
  box-shadow:0 18px 55px rgba(58,61,65,.08)!important;
}

html:not([data-theme="dark"]) .mahed-placement-inner h2{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-placement-inner p{
  color:var(--muted)!important;
}

html:not([data-theme="dark"]) .mahed-placement-cta::before{
  background:radial-gradient(circle,rgba(255,106,0,.08),transparent 70%)!important;
}

html:not([data-theme="dark"]) .mahed-footer{
  background:#ffffff!important;
  color:var(--ink)!important;
  border-top:1px solid var(--line);
}

html:not([data-theme="dark"]) .mahed-footer::before{
  background:radial-gradient(circle,rgba(255,106,0,.06),transparent 70%)!important;
}

html:not([data-theme="dark"]) .mahed-footer-brand-name,
html:not([data-theme="dark"]) .mahed-footer-col h3{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-footer-brand-en{
  color:var(--muted)!important;
}

html:not([data-theme="dark"]) .mahed-footer-brand > p,
html:not([data-theme="dark"]) .mahed-footer-col a,
html:not([data-theme="dark"]) .mahed-footer-bottom{
  color:var(--muted)!important;
}

html:not([data-theme="dark"]) .mahed-footer-col a:hover{
  color:var(--gold)!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact{
  border-top-color:var(--line)!important;
  border-bottom-color:var(--line)!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact strong{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-footer-test-link{
  color:var(--gold)!important;
}

/* =========================================================
   FINAL LIGHT MODE — FOOTER CONTACT + CTA BUTTON
   ========================================================= */

/* نوار مشاوره تلفنی / مجله / تعیین سطح */
html:not([data-theme="dark"]) .mahed-footer-contact{
  background:#ffffff!important;
  color:var(--ink)!important;
  border-top:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact,
html:not([data-theme="dark"]) .mahed-footer-contact *{
  background-color:transparent!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact strong{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact a{
  color:var(--ink)!important;
  text-decoration:none!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact a:hover{
  color:var(--gold)!important;
}

html:not([data-theme="dark"]) .mahed-footer-test-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  background:var(--gold)!important;
  color:#ffffff!important;
  border-radius:10px!important;
  padding:10px 18px!important;
  font-weight:900!important;
  text-decoration:none!important;
  box-shadow:0 8px 20px rgba(255,106,0,.18)!important;
}

html:not([data-theme="dark"]) .mahed-footer-test-link,
html:not([data-theme="dark"]) .mahed-footer-test-link span{
  color:#ffffff!important;
}

html:not([data-theme="dark"]) .mahed-footer-test-link:hover{
  background:var(--gold-d)!important;
  color:#ffffff!important;
  transform:translateY(-1px);
}

/* تیتر/برچسب بخش تماس */
html:not([data-theme="dark"]) .mahed-footer-contact span{
  color:var(--gold)!important;
}

/* اگر لینک‌های نوار تماس کلاس عمومی گرفته باشند */
html:not([data-theme="dark"]) .mahed-footer-contact .mahed-footer-test-link{
  color:#ffffff!important;
}

/* فوتر اصلی */
html:not([data-theme="dark"]) .mahed-footer{
  background:#ffffff!important;
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-footer-main,
html:not([data-theme="dark"]) .mahed-footer-bottom{
  background:transparent!important;
}


/* =========================================================
   FINAL LIGHT MODE — FOOTER CONTACT LINKS
   ========================================================= */

html:not([data-theme="dark"]) .mahed-footer-contact a[href^="tel:"]{
  color:var(--ink)!important;
  background:transparent!important;
  text-decoration:none!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact a[href="#blog"],
html:not([data-theme="dark"]) .mahed-footer-contact a[href="/placement"],
html:not([data-theme="dark"]) .mahed-footer-contact a[href$="/placement"],
html:not([data-theme="dark"]) .mahed-footer-contact a[href*="#blog"]{
  color:var(--ink)!important;
  background:transparent!important;
  text-decoration:none!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact a[href^="tel:"] strong,
html:not([data-theme="dark"]) .mahed-footer-contact a[href="#blog"] strong,
html:not([data-theme="dark"]) .mahed-footer-contact a[href="/placement"] strong{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact a[href^="tel:"]:hover,
html:not([data-theme="dark"]) .mahed-footer-contact a[href="#blog"]:hover,
html:not([data-theme="dark"]) .mahed-footer-contact a[href="/placement"]:hover{
  color:var(--gold)!important;
}

/* هر متن آزاد داخل نوار تماس */
html:not([data-theme="dark"]) .mahed-footer-contact{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-footer-contact div,
html:not([data-theme="dark"]) .mahed-footer-contact p{
  color:var(--ink)!important;
}

/* برچسب‌های طلایی نوار */
html:not([data-theme="dark"]) .mahed-footer-contact span{
  color:var(--gold)!important;
}

/* =========================================================
   FINAL LIGHT MODE — HEADER TOPBAR
   ========================================================= */

html:not([data-theme="dark"]) .mahed-topbar{
  background:#ffffff!important;
  color:var(--ink)!important;
  border-bottom:1px solid var(--line)!important;
}

html:not([data-theme="dark"]) .mahed-topbar-inner{
  background:transparent!important;
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-topbar a{
  background:transparent!important;
  color:var(--ink)!important;
  text-decoration:none!important;
}

html:not([data-theme="dark"]) .mahed-topbar a:hover{
  color:var(--gold)!important;
}

html:not([data-theme="dark"]) .mahed-topbar .mahed-phone{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-topbar .mahed-phone strong{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-topbar .mahed-phone span{
  color:var(--muted)!important;
}

html:not([data-theme="dark"]) .mahed-top-links{
  background:transparent!important;
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-top-links a{
  color:var(--ink)!important;
}

html:not([data-theme="dark"]) .mahed-top-links a:hover{
  color:var(--gold)!important;
}

/* =========================================================
   MAHED TOPBAR — FINAL LIGHT + DARK
   ========================================================= */

.mahed-topbar{
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  font-size:13px!important;
  font-weight:700!important;
}

.mahed-topbar-inner{
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  line-height:1.8!important;
}

.mahed-topbar a{
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.8!important;
  transition:color .2s ease,opacity .2s ease!important;
}

.mahed-topbar .mahed-phone{
  font-size:13px!important;
  font-weight:700!important;
}

.mahed-topbar .mahed-phone strong{
  font-size:14px!important;
  font-weight:900!important;
  letter-spacing:.2px!important;
}

.mahed-topbar .mahed-phone span{
  font-size:12px!important;
  font-weight:600!important;
}

.mahed-top-links{
  display:flex!important;
  align-items:center!important;
  gap:22px!important;
}

.mahed-top-links a{
  font-size:13px!important;
  font-weight:800!important;
}

/* LIGHT */
html:not([data-theme="dark"]) .mahed-topbar{
  background:#fff!important;
  color:#242525!important;
  border-bottom:1px solid #e4e5e6!important;
}

html:not([data-theme="dark"]) .mahed-topbar a,
html:not([data-theme="dark"]) .mahed-topbar .mahed-phone,
html:not([data-theme="dark"]) .mahed-topbar .mahed-phone strong,
html:not([data-theme="dark"]) .mahed-top-links a{
  color:#242525!important;
}

html:not([data-theme="dark"]) .mahed-topbar .mahed-phone span{
  color:#848990!important;
}

/* DARK */
[data-theme="dark"] .mahed-topbar{
  background:#202223!important;
  color:#f4f4f4!important;
  border-bottom:1px solid #383b3e!important;
}

[data-theme="dark"] .mahed-topbar a,
[data-theme="dark"] .mahed-topbar .mahed-phone,
[data-theme="dark"] .mahed-topbar .mahed-phone strong,
[data-theme="dark"] .mahed-top-links a{
  color:#f4f4f4!important;
}

[data-theme="dark"] .mahed-topbar .mahed-phone span{
  color:#a3a6aa!important;
}

/* HOVER */
.mahed-topbar a:hover{
  color:#ff6a00!important;
}

/* MOBILE */
@media(max-width:680px){
  .mahed-topbar{
    min-height:36px!important;
  }

  .mahed-topbar-inner{
    min-height:36px!important;
    gap:10px!important;
  }

  .mahed-topbar a,
  .mahed-topbar .mahed-phone{
    font-size:11px!important;
  }

  .mahed-topbar .mahed-phone strong{
    font-size:11.5px!important;
  }

  .mahed-top-links{
    gap:12px!important;
  }

  .mahed-top-links a{
    font-size:11px!important;
  }
}

/* ===== MAHED FOOTER DESKTOP - spacing fix ===== */
@media (min-width: 681px) {
  .mahed-footer-main {
    align-items: flex-start;
  }

  .mahed-footer-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0;
  }

  .mahed-footer-col h3,
  .mahed-footer-col h4 {
    margin-bottom: 8px !important;
  }

  .mahed-footer-col a {
    display: block !important;
    width: fit-content;
    line-height: 1.9 !important;
    text-decoration: none;
    white-space: normal;
  }

  .mahed-footer-col a + a {
    margin-top: 2px;
  }
}

.mahed-dev-credit{
  width:100%;
  text-align:center;
  margin-top:8px;
  font-size:9px;
  line-height:1;
  opacity:.22;
  direction:ltr;
}

.mahed-dev-credit a{
  color:inherit;
  text-decoration:none;
}

.mahed-dev-credit:hover{
  opacity:.55;
}


/* MAHED PLACEMENT — LANGUAGE SELECTOR */
.mahed-placement-language-box{
  overflow:hidden;
}

.mahed-placement-language-head{
  text-align:right;
  margin-bottom:22px;
}

.mahed-placement-language-head h2{
  margin:14px 0 7px;
  color:var(--ink);
  font-size:21px;
  line-height:1.7;
}

.mahed-placement-language-head p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:2;
}

.mahed-placement-language-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;
}

.mahed-placement-language-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  min-height:88px;
  padding:16px 17px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--bg);
  color:var(--ink);
  text-align:right;
  cursor:pointer;
  transition:
    border-color .2s ease,
    background .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.mahed-placement-language-card:hover{
  border-color:rgba(211,158,74,.55);
  background:var(--surface);
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(0,0,0,.06);
}

.mahed-placement-language-card:active{
  transform:translateY(0);
}

.mahed-placement-language-flag{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 48px;
  width:48px;
  height:48px;
  border-radius:14px;
  background:var(--surface);
  font-size:25px;
}

.mahed-placement-language-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:3px;
  flex:1;
}

.mahed-placement-language-copy strong{
  color:var(--ink);
  font-size:16px;
  font-weight:900;
  line-height:1.5;
}

.mahed-placement-language-copy small{
  color:var(--muted);
  font-size:11px;
  line-height:1.7;
}

.mahed-placement-language-arrow{
  color:var(--gold);
  font-size:18px;
  font-weight:900;
  transition:transform .2s ease;
}

.mahed-placement-language-card:hover .mahed-placement-language-arrow{
  transform:translateX(-4px);
}

[data-theme="dark"] .mahed-placement-language-card{
  background:var(--card);
}

@media(max-width:680px){
  .mahed-placement-language-options{
    grid-template-columns:1fr;
  }

  .mahed-placement-language-card{
    min-height:82px;
    padding:14px;
  }

  .mahed-placement-language-flag{
    flex-basis:44px;
    width:44px;
    height:44px;
  }
}


/* ===== MAHED SOCIAL ICONS — FINAL SAFE DISPLAY FIX ===== */
#socialLinks{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  flex-wrap:wrap !important;
  opacity:1 !important;
  visibility:visible !important;
}

#socialLinks > a#socialInstagram,
#socialLinks > a#socialTelegram,
#socialLinks > a#socialLinkedin{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 42px !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  min-height:42px !important;
  max-width:42px !important;
  max-height:42px !important;
  padding:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
  position:relative !important;
  overflow:hidden !important;
  visibility:visible !important;
  opacity:1 !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  border-radius:12px !important;
  color:#fff !important;
  text-decoration:none !important;
  font-size:0 !important;
  line-height:0 !important;
}

#socialLinks > a#socialInstagram > img,
#socialLinks > a#socialTelegram > img,
#socialLinks > a#socialLinkedin > img{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  position:relative !important;
  inset:auto !important;
  flex:0 0 auto !important;
  width:26px !important;
  height:26px !important;
  min-width:26px !important;
  min-height:26px !important;
  max-width:26px !important;
  max-height:26px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  object-fit:contain !important;
  object-position:center !important;
  filter:none !important;
  transform:none !important;
}

#socialLinks > a#socialInstagram::before,
#socialLinks > a#socialInstagram::after,
#socialLinks > a#socialTelegram::before,
#socialLinks > a#socialTelegram::after,
#socialLinks > a#socialLinkedin::before,
#socialLinks > a#socialLinkedin::after{
  content:none !important;
  display:none !important;
}

#socialLinks > a:hover{
  transform:translateY(-2px) !important;
  background:rgba(255,255,255,.18) !important;
}

@media (max-width:680px){
  #socialLinks{
    justify-content:center !important;
    gap:10px !important;
  }
}

/* ===== MAHED SOCIAL ICONS — VISIBILITY FINAL ===== */
footer .mahed-footer-social#socialLinks{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  visibility:visible !important;
  opacity:1 !important;
}

footer .mahed-footer-social#socialLinks > a#socialInstagram,
footer .mahed-footer-social#socialLinks > a#socialTelegram,
footer .mahed-footer-social#socialLinks > a#socialLinkedin{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:relative !important;
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  max-width:44px !important;
  min-height:44px !important;
  max-height:44px !important;
  padding:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  border-radius:12px !important;
  background:#3a3d41 !important;
  border:1px solid rgba(255,255,255,.22) !important;
  color:#fff !important;
  visibility:visible !important;
  opacity:1 !important;
}

footer .mahed-footer-social#socialLinks > a > img{
  display:block !important;
  position:relative !important;
  z-index:2 !important;
  width:26px !important;
  height:26px !important;
  min-width:26px !important;
  min-height:26px !important;
  max-width:26px !important;
  max-height:26px !important;
  margin:0 !important;
  padding:0 !important;
  object-fit:contain !important;
  object-position:center !important;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
}

footer .mahed-footer-social#socialLinks > a > .sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

@media (max-width:680px){
  footer .mahed-footer-social#socialLinks{
    justify-content:center !important;
    gap:10px !important;
  }
}
