:root{
  --bg:#0b1020;
  --surface:#121a33cc;
  --surface2:#0f1732cc;
  --text:#eaf0ff;
  --muted:#b6c2ffcc;

  --brand:#7c5cff;
  --brand2:#00d4ff;

  --ok:#22c55e;
  --warn:#f59e0b;
  --danger:#ef4444;

  --border: rgba(255,255,255,.10);
  --border2: rgba(255,255,255,.14);
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --glass: blur(10px);
  --radius: 18px;
  --radius2: 26px;
  --max: 1180px;

  --btnBg: rgba(255,255,255,.06);
  --btnBgHover: rgba(255,255,255,.09);
  --headerBg: rgba(7,10,22,.55);
  --panelBg: rgba(10,14,30,.92);
  --backdrop: rgba(0,0,0,.55);
  --chipBg: linear-gradient(90deg, rgba(124,92,255,.18), rgba(0,212,255,.12));
  --vh: 1vh;
}
body.tm-light{
  --bg:#f5f7ff;
  --surface: rgba(255,255,255,.92);
  --surface2: rgba(255,255,255,.75);
  --text:#0b1020;
  --muted: rgba(11,16,32,.70);
  --border: rgba(11,16,32,.10);
  --border2: rgba(11,16,32,.14);
  --shadow: 0 20px 60px rgba(11,16,32,.14);
  --btnBg: rgba(11,16,32,.06);
  --btnBgHover: rgba(11,16,32,.09);
  --headerBg: rgba(255,255,255,.70);
  --panelBg: rgba(255,255,255,.92);
  --backdrop: rgba(11,16,32,.45);
  --chipBg: linear-gradient(90deg, rgba(124,92,255,.12), rgba(0,212,255,.10));
}

*{ box-sizing:border-box; }
html, body{
  margin:0; padding:0;
  width:100%; max-width:100%;
  overflow-x:hidden;
}
body{
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(124,92,255,.35), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(0,212,255,.25), transparent 55%),
    radial-gradient(900px 600px at 50% 90%, rgba(34,197,94,.18), transparent 55%),
    var(--bg);
  min-height:100vh;
  line-height:1.8;
}
img, video{ max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
.container{ width:min(var(--max), 92%); margin:0 auto; }

.chip{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.35rem .7rem; border-radius:999px;
  background: var(--chipBg);
  border:1px solid var(--border);
  color:var(--muted);
  font-size:.9rem;
  max-width:100%;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  padding:.78rem 1rem; border-radius:999px;
  border:1px solid var(--border2);
  background: var(--btnBg);
  color:var(--text);
  cursor:pointer;
  transition:.2s transform, .2s background, .2s border, .2s filter;
  user-select:none;
  white-space:nowrap;
  max-width:100%;
}
.btn:hover{ transform:translateY(-1px); background:var(--btnBgHover); border-color:rgba(255,255,255,.20); }
.btn.primary{
  border:none;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  box-shadow: 0 18px 50px rgba(124,92,255,.22);
  color:#fff;
}
.btn.ok{ background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.35); }
.btn.warn{ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.35); }
.btn.danger{ background:rgba(239,68,68,.10); border-color:rgba(239,68,68,.35); }
.btn.ghost{ background:transparent; }
.badge{
  display:inline-flex; align-items:center;
  padding:.22rem .55rem; border-radius:999px;
  font-size:.8rem; color:var(--text);
  border:1px solid var(--border2);
  background: var(--btnBg);
  max-width:100%;
}

/* Header */
header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: var(--glass);
  background: var(--headerBg);
  border-bottom:1px solid var(--border);
}
.navWrap{
  display:flex; align-items:center; justify-content:space-between;
  gap:.6rem; padding: .8rem 0;
  min-width:0;
}
.brand{
  display:flex; align-items:center; gap:.65rem;
  min-width:0; flex: 1 1 auto;
}
.logo{
  width:40px; height:40px; border-radius:14px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 18px 40px rgba(0,212,255,.12);
  position:relative;
  flex: 0 0 auto;
}
.logo:after{
  content:""; position:absolute; inset:9px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,.75);
  opacity:.85;
}
.logo.hasLogo{
  overflow:hidden;
  background: var(--surface2);
  border:1px solid var(--border2);
}
.logo.hasLogo img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.logo.hasLogo:after{ display:none; }
.brandText{ min-width:0; display:flex; flex-direction:column; }
.brandText h1{
  margin:0; font-size:1.02rem; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.brandText p{
  margin:0; font-size:.82rem; color:var(--muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.navActions{ display:flex; align-items:center; justify-content:flex-end; gap:.45rem; flex:0 0 auto; }
.tinyBtn{ padding:.6rem .85rem; border-radius:999px; }
.menu{
  display:flex; align-items:center; gap:.55rem;
  flex-wrap:wrap; justify-content:center;
  padding: .55rem 0 .9rem;
}
.menu a{
  padding:.52rem .85rem;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--btnBg);
  color:var(--muted);
  transition:.2s;
  max-width:100%;
}
.menu a:hover{ background:var(--btnBgHover); color:var(--text); }
@media (max-width: 860px){
  .menu{ display:none; }
  .brandText p{ display:none; }
  .tinyBtn{ padding:.55rem .8rem; }
}

/* Drawer */
.drawer{ display:none; position:fixed; inset:0; z-index:80; background: var(--backdrop); }
.drawer.open{ display:block; }
.panel{
  position:absolute; top:0; right:0;
  width:min(360px, 88%); height:100%;
  background: var(--panelBg);
  backdrop-filter: var(--glass);
  border-left:1px solid var(--border);
  padding:1rem;
  box-shadow: var(--shadow);
}
.panel a{
  display:block;
  padding:.85rem 1rem;
  border-radius:14px;
  margin:.5rem 0;
  border:1px solid var(--border);
  background: var(--btnBg);
  max-width:100%;
}
.panel a:hover{ background: var(--btnBgHover); }

/* Hero */
.hero{ padding: 2rem 0 1.2rem; }
.heroGrid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:1.2rem;
  align-items:stretch;
}
@media (max-width: 980px){ .heroGrid{ grid-template-columns: 1fr; } }
.heroCard, .sideCard{
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  overflow:hidden;
  position:relative;
  min-width:0;
}
.heroCard{
  padding: 1.6rem 1.4rem 1.3rem;
  min-height: 320px;
}
.heroCard:before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(600px 260px at 20% 0%, rgba(124,92,255,.28), transparent 60%),
              radial-gradient(540px 260px at 85% 10%, rgba(0,212,255,.22), transparent 60%);
  pointer-events:none;
}
.heroContent{ position:relative; min-width:0; }
.heroTitle{
  margin:.7rem 0 .6rem;
  font-size: clamp(1.4rem, 2.4vw, 2.35rem);
  line-height:1.35;
  letter-spacing:-.2px;
  max-width:100%;
}
.heroText{ color:var(--muted); margin:0 0 1.1rem; max-width:62ch; }
.kpiRow{ display:flex; flex-wrap:wrap; gap:.55rem; margin-top:1rem; }
.kpi{
  padding:.55rem .75rem;
  border-radius: 14px;
  border:1px solid var(--border);
  background: var(--btnBg);
  color:var(--muted);
  font-size:.9rem;
  max-width:100%;
}
.sideCard{
  padding: 1.2rem;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height: 320px;
}
.sideCard h3{ margin:.1rem 0 .4rem; }
.sideCard p{ margin:.2rem 0; color:var(--muted); }
.quickRow{ display:flex; gap:.55rem; flex-wrap:wrap; margin-top:.9rem; }

section{ padding: 1.2rem 0; }
.sectionHead{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:1rem; margin-bottom:.8rem;
  min-width:0;
}
.sectionHead h2{ margin:0; font-size:1.25rem; }
.sectionHead p{ margin:0; color:var(--muted); font-size:.95rem; }

.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 980px){ .grid3{ grid-template-columns: 1fr; } }

.card{
  border-radius: var(--radius);
  background: var(--surface2);
  border:1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow:hidden;
  backdrop-filter: var(--glass);
  min-width:0;
}
.cardPad{ padding: 1rem; }
.card h3{ margin:.2rem 0 .35rem; font-size:1.05rem; }
.card p{ margin:0; color:var(--muted); }

/* Edu */
.eduBar{
  display:flex; gap:.6rem; flex-wrap:wrap;
  align-items:center; justify-content:space-between;
  margin-bottom:.8rem;
  min-width:0;
}
.searchBox{
  display:flex; gap:.5rem; align-items:center; flex: 1 1 320px;
  min-width: 0;
  border-radius: 999px;
  border:1px solid var(--border);
  background: var(--btnBg);
  padding:.55rem .75rem;
  max-width:100%;
}
.searchBox input{
  width:100%;
  min-width:0;
  border:none; outline:none;
  background:transparent;
  color:var(--text);
  font-family:inherit;
  font-size:.95rem;
}
.eduGrid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1050px){ .eduGrid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 560px){ .eduGrid{ grid-template-columns: 1fr;} }
.eduItem{
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--surface2);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  display:flex; flex-direction:column;
  min-height: 320px;
  cursor:pointer;
  transition:.15s transform, .15s filter;
  min-width:0;
}
.eduItem:hover{ transform: translateY(-2px); filter:brightness(1.02); }
.thumb{
  height: 190px;
  background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(0,212,255,.18));
  position:relative;
  display:flex; align-items:center; justify-content:center;
  font-weight: 800;
  letter-spacing: .2px;
  text-align:center;
  padding:0 .6rem;
  color: rgba(255,255,255,.95);
}
.thumb.hasPoster{
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.thumb.hasPoster::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55));
}
.thumb .thumbInner{
  position:relative;
  display:flex; align-items:center; gap:.45rem;
  padding:.45rem .7rem;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.20);
  backdrop-filter: blur(8px);
}
.thumb small{
  position:absolute;
  bottom:10px;
  left:10px;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.15);
  padding:.22rem .5rem;
  border-radius:999px;
  font-weight:600;
  color: rgba(255,255,255,.92);
  z-index:2;
}
.eduBody{ padding: 1rem; display:flex; flex-direction:column; gap:.4rem; flex:1; min-width:0; }
.eduBody h3{ margin:.15rem 0; font-size:1.02rem; }
.eduBody p{ margin:0; color:var(--muted); font-size:.95rem; }
.eduMeta{
  margin-top:auto;
  display:flex; justify-content:space-between; align-items:center;
  gap:.5rem;
  color:var(--muted);
  font-size:.85rem;
  min-width:0;
}
.pager{
  display:flex; align-items:center; justify-content:center;
  gap:.5rem; flex-wrap:wrap;
  margin-top: 1rem;
}
.pager button{ min-width: 44px; }
.pager .active{
  background: linear-gradient(90deg, rgba(124,92,255,.22), rgba(0,212,255,.16));
  border-color: rgba(255,255,255,.22);
  color: var(--text);
}

/* forms */
.formGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:1rem;
}
@media (max-width: 900px){ .formGrid{ grid-template-columns:1fr; } }
.field{ display:flex; flex-direction:column; gap:.35rem; min-width:0; }
label{ color:var(--muted); font-size:.9rem; }
input, textarea{
  border-radius: 16px;
  border:1px solid var(--border);
  background: var(--btnBg);
  padding:.85rem 1rem;
  color: var(--text);
  outline:none;
  font-family:inherit;
  font-size: .95rem;
  min-width:0;
}
textarea{ min-height: 120px; resize: vertical; }

/* footer */
footer{
  margin-top: 1.2rem;
  padding: 1.6rem 0 2.2rem;
  border-top:1px solid var(--border);
  color:var(--muted);
}
.footerGrid{
  display:grid; gap:1rem;
  grid-template-columns: 1.2fr .8fr;
}
@media (max-width: 980px){ .footerGrid{ grid-template-columns:1fr; } }

/* Floating actions: LEFT */
.floatActions{
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  right: auto;
  display:flex;
  flex-direction:column;
  gap:.55rem;
  z-index: 90;
  max-width: calc(100vw - 28px);
}
.fab{
  width: 52px; height: 52px;
  border-radius: 18px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--border2);
  background: var(--btnBg);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  transition:.2s transform, .2s background;
  flex: 0 0 auto;
}
.fab:hover{ transform: translateY(-2px); background: var(--btnBgHover); }
.fab.whatsapp{ border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); }
.fab.call{ border-color: rgba(0,212,255,.35); background: rgba(0,212,255,.10); }
.fab.insta{ border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.10); }
@media (max-width: 360px){
  .fab{ width:48px; height:48px; border-radius:16px; }
}

/* reveal */
.reveal{ opacity:0; transform: translateY(10px); transition: .6s; }
.reveal.show{ opacity:1; transform:none; }

/* Modal */
dialog{
  width: min(920px, 96vw);
  max-width: 96vw;
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
  max-height: calc(var(--vh) * 92);
}
dialog::backdrop{background:rgba(0,0,0,.28);backdrop-filter:blur(1.5px);}
.modalHead{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:.6rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(124,92,255,.12), rgba(0,212,255,.08));
  min-width:0;
}
.modalTitle{ display:flex; flex-direction:column; gap:.15rem; min-width:0; }
.modalTitle strong{
  font-size:1.02rem;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.modalTitle span{ font-size:.85rem; color: var(--muted); }
.topRightActions{ display:flex; gap:.5rem; align-items:center; flex:0 0 auto; }
.modalBody{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  height: calc((var(--vh) * 92) - 68px);
  min-height: 0;
}
.mediaPane{
  background: rgba(0,0,0,.10);
  border-left: 1px solid var(--border);
  padding: 1rem;
  display:flex; align-items:center; justify-content:center;
  min-width:0;
  overflow:hidden;
}
.mediaBox{ width: 100%; max-width: 640px; min-width:0; }
video{
  width:100%;
  border-radius: 18px;
  border:1px solid var(--border);
  background: #000;
}
img.modalImg{
  width:100%;
  border-radius: 18px;
  border:1px solid var(--border);
  display:block;
}
.infoPane{
  padding: 1rem;
  min-width:0;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
@media (max-width: 900px){
  .modalBody{
    display:flex;
    flex-direction:column;
    height: calc((var(--vh) * 92) - 68px);
  }
  .mediaPane{
    border-left:none;
    border-bottom:1px solid var(--border);
    padding: .9rem;
    flex: 0 0 auto;
  }
  .infoPane{
    flex: 1 1 auto;
    overflow:auto;
  }
}
.tabs{ display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom: .8rem; }
.tabBtn{
  padding: .55rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--btnBg);
  color: var(--muted);
  cursor:pointer;
  transition:.15s;
  font-family:inherit;
  max-width:100%;
}
.tabBtn.active{
  color: var(--text);
  background: linear-gradient(90deg, rgba(124,92,255,.22), rgba(0,212,255,.16));
}
.tabPanel{ display:none; }
.tabPanel.active{ display:block; }
.commentList{ display:flex; flex-direction:column; gap:.6rem; margin-top:.6rem; }
.commentItem{
  border:1px solid var(--border);
  background: var(--btnBg);
  border-radius: 16px;
  padding:.75rem .85rem;
  max-width:100%;
  overflow-wrap:anywhere;
}
.commentMeta{
  display:flex; justify-content:space-between; gap:.6rem;
  color: var(--muted);
  font-size:.82rem;
  margin-bottom:.25rem;
}

/* FAQ Modal */
#faqModal{ width:min(820px,96vw); max-width:96vw; max-height:92vh; overflow:hidden; }
.faqBody{ height: calc(92vh - 68px); overflow:auto; -webkit-overflow-scrolling:touch; padding-bottom: 18px; }
.faqItem{ border:1px solid var(--border); background: var(--btnBg); border-radius:18px; overflow:hidden; margin-bottom:.7rem; }
.faqQ{ display:flex; justify-content:space-between; align-items:center; gap:.8rem; padding:.85rem 1rem; cursor:pointer; color: var(--text); }
.faqQ span{ color: var(--muted); font-size:.9rem; }
.faqA{ display:none; padding:0 1rem 1rem; color: var(--muted); }
.faqItem.open .faqA{ display:block; }

/* Service lookup form */
.tmForm label{ display:block; margin-top:.4rem; color:var(--muted); font-size:.95rem; }
.tmForm input, .tmForm select{ width:100%; margin-top:.35rem; padding:.9rem 1rem; border-radius:18px; border:1px solid var(--border); background: var(--btnBg); color: var(--text); outline:none; }
.tmForm input:focus, .tmForm select:focus{ box-shadow:0 0 0 3px rgba(96,165,250,.25); }

/* ===============================
   افزوده‌های نسخه پیشخوان + FAQ + سرویس دوره‌ای
   =============================== */

/* رفع مشکل منوی موبایل در حالت لایت: حذف رنگ‌های هاردکد و استفاده از CSS Variables */
body.tm-light .drawerPanel,
body.tm-light .drawer,
body.tm-light .navWrap{
  background: color-mix(in srgb, var(--card) 90%, transparent) !important;
  border-color: rgba(0,0,0,.08) !important;
}
body.tm-light .drawerLink,
body.tm-light .nav a{ color: var(--text) !important; }

/* Modal */
.tmModal{position:fixed; inset:0; display:none; z-index:9999;}
.tmModal.isOpen{display:block;}
.tmModalBackdrop{position:absolute; inset:0; background:rgba(0,0,0,.55);}
.tmModalCard{position:relative; margin:6vh auto; width:min(860px, calc(100% - 24px));
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border:1px solid rgba(255,255,255,.14);
  border-radius:24px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  overflow:hidden;
}
body.tm-light .tmModalCard{border-color:rgba(0,0,0,.10);}
.tmModalHead{display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.12);
}
body.tm-light .tmModalHead{border-bottom-color:rgba(0,0,0,.08);}
.tmModalBody{padding:16px; max-height:70vh; overflow:auto;}
body.tmModalOpen{overflow:hidden;}

/* FAQ accordion */
.tmAccordion{display:grid; gap:10px;}
.tmAccItem{background: color-mix(in srgb, var(--card) 72%, transparent); border:1px solid rgba(255,255,255,.12);
  border-radius:16px; padding:10px 12px;
}
body.tm-light .tmAccItem{border-color:rgba(0,0,0,.08);}
.tmAccItem summary{cursor:pointer; font-weight:800;}
.tmAccContent{padding-top:8px; color:var(--muted); line-height:1.9;}

/* Form grid */
.formGrid{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media (max-width:700px){.formGrid{grid-template-columns:1fr;}}
.field label{display:block; margin-bottom:6px; color:var(--muted); font-weight:700;}
.field input,.field select{width:100%;}

/* Better select (mobile) */
select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(1.2rem) calc(1.25rem), calc(1.45rem) calc(1.25rem);
  background-size: 6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-left: 2.2rem;
}

/* Toast */
.tmToast{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index:200;
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
  border-radius: 18px;
  width: min(520px, calc(100vw - 24px));
  display:none;
}
.tmToast.show{ display:block; animation: tmPop .18s ease-out; }
.tmToast strong{ display:block; color:var(--text); margin-bottom:.25rem; }
.tmToast p{ margin:0; color:var(--muted); line-height:1.7; }
@keyframes tmPop{ from{ transform:translateX(-50%) translateY(10px); opacity:0 } to{ transform:translateX(-50%) translateY(0); opacity:1 } }

/* Fallback modal when <dialog> unsupported */
#faqModal.openFallback{
  position:fixed; inset:0; display:block;
  width:100vw; height:100vh; max-height:100vh;
  background: var(--surface);
  border:none; border-radius:0;
  z-index:150;
}
body.tmModalOpen{ overflow:hidden; }

body.tmModalOpen::before{
  content:'';
  position:fixed; inset:0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(3px);
  z-index:149;
}
#faqModal.openFallback{
  max-width: min(860px, calc(100vw - 18px));
  margin: 9px auto;
  border-radius: 26px;
  box-shadow: var(--shadow);
}
@media (max-width: 560px){
  #faqModal.openFallback{ margin: 10px; max-width: calc(100vw - 20px); border-radius: 22px; }
}

#faqModal{ opacity:1 !important; }

/* Input fields unified */
.tmField, input[type="text"].tmField, input[type="tel"].tmField, select.tmField{
  width:100%;
  border:1px solid var(--border);
  background: rgba(255,255,255,.10);
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: .95rem 1.1rem;
  outline:none;
}
select.tmField{ padding-left: 2.4rem; }
.tmField:focus{ border-color: rgba(80,140,255,.75); box-shadow: 0 0 0 4px rgba(80,140,255,.15); }

/* Embed wrappers (Aparat/YouTube) */
.tmMediaBox{ width:100%; aspect-ratio:16/9; background:#000; border-radius:16px; overflow:hidden; position:relative; }
.tmMediaBox .tmEmbed, .tmMediaBox iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.tmMediaBox .tmVideo, .tmMediaBox video{ position:absolute; inset:0; width:100%; height:100%; border:0; object-fit:contain; background:#000; }


/* Back to top button */
.tm-backtotop{
  position: fixed;
  inset-inline-start: 18px;
  inset-inline-end: auto;
  inset-block-end: 84px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(20,24,35,.55);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.tm-backtotop:hover{ transform: translateY(-1px); }
.tm-backtotop.is-visible{ display:flex; }

/* Make header a bit more accessible when sticky offsets are used */
html{ scroll-padding-top: 92px; }

/* Comments form (tm_edu) */
.tm-comment-form p{
  margin: .7rem 0;
}
.tm-comment-form input[type="text"],
.tm-comment-form input[type="email"],
.tm-comment-form input[type="url"],
.tm-comment-form textarea{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: .75rem .9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.6);
}
.tm-comment-form textarea{ min-height: 140px; resize: vertical; }
.tm-comment-form label{
  display:block;
  margin: 0 0 .35rem 0;
  font-weight: 600;
}
.tm-comment-form .form-submit{
  margin-top: .9rem;
}
.tm-comment-form .form-submit input[type="submit"]{
  width: 100%;
  max-width: 420px;
}
@media (max-width: 520px){
  .tm-comment-form .form-submit input[type="submit"]{
    max-width: 100%;
  }
}

/* Frontend quick service registration by QR */
.tmRegisterPage{ min-height:calc(100vh - 180px); }
.tmRegisterHero{ padding:2rem 0 1.4rem; }
.tmRegisterCard{ max-width:760px; margin-inline:auto; }
.tmRegisterCompact .cardPad{ padding:clamp(1rem, 3vw, 2rem); }
.tmRegisterTitle{ margin:.7rem 0 .4rem; font-size:clamp(1.45rem, 3vw, 2.15rem); line-height:1.45; }
.tmRegisterText{ color:var(--muted); margin:.2rem 0 1.2rem; max-width:65ch; line-height:1.9; }
.tmRegisterSteps{ display:grid; grid-template-columns:repeat(3,1fr); gap:.6rem; margin:1rem 0 1.25rem; }
.tmRegisterSteps span{ display:flex; align-items:center; justify-content:center; gap:.45rem; min-height:52px; padding:.65rem .7rem; border:1px solid var(--border); border-radius:16px; background:var(--btnBg); font-size:.9rem; text-align:center; }
.tmRegisterSteps b{ display:grid; place-items:center; width:28px; height:28px; flex:0 0 auto; border-radius:50%; background:var(--primary); color:#111; }
.tmRegisterForm{ display:grid; gap:1rem; }
.tmRegisterForm select,
.tmRegisterForm input{ width:100%; min-height:52px; }
.tmRegisterForm small,
.tmFieldHint{ color:var(--muted); font-size:.82rem; }
.tmRegisterForm label span{ color:var(--muted); font-size:.82rem; }
.tmHoney{ position:absolute !important; right:-9999px !important; opacity:0 !important; height:1px !important; width:1px !important; }
.tmRegisterPrivacy{ margin:0; padding:.85rem 1rem; border:1px solid var(--border); border-radius:16px; background:var(--btnBg); color:var(--muted); font-size:.88rem; line-height:1.9; }
.tmRegisterActions{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.1rem; }
.tmRegisterActions .primary{ min-width:250px; }
.tmRegisterMsg{ margin-top:.1rem; padding:.9rem 1rem; border-radius:16px; border:1px solid var(--border); background:var(--btnBg); color:var(--muted); display:none; line-height:1.9; }
.tmRegisterMsg.isVisible{ display:block; }
.tmRegisterMsg.isSuccess{ color:#86efac; border-color:rgba(34,197,94,.35); background:rgba(34,197,94,.10); }
body.tm-light .tmRegisterMsg.isSuccess{ color:#166534; }
.tmRegisterMsg.isError{ color:#fca5a5; border-color:rgba(239,68,68,.35); background:rgba(239,68,68,.10); }
body.tm-light .tmRegisterMsg.isError{ color:#991b1b; }
.tmAlert{ margin:1rem 0 0; padding:1rem; border-radius:16px; border:1px solid var(--border); background:var(--btnBg); }
.tmAlertWarn{ border-color:rgba(245,158,11,.35); background:rgba(245,158,11,.10); }
@media (max-width:620px){
  .tmRegisterHero{ padding:1.1rem 0; }
  .tmRegisterCard .cardPad{ padding:.9rem; }
  .tmRegisterSteps{ grid-template-columns:1fr; gap:.45rem; }
  .tmRegisterSteps span{ justify-content:flex-start; min-height:46px; }
  .tmRegisterActions .btn{ width:100%; }
}

/* نسخه 2.3.1: لینک خانه همیشه واضح و قابل تشخیص باشد. */
.menu .tm-home-link,
.menu .tm-home-link.current-menu-item,
.panel .tm-home-link,
.panel .tm-home-link.current-menu-item{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(90deg,var(--brand),var(--brand2));
  font-weight:800;
}
