/* =========================================================
   آکادمی دیمن — صفحه لینک ارتباطی (نسخه مینیمال)
   ========================================================= */

:root{
  --bg:            #090909;
  --card:          #121212;
  --border:        rgba(255,255,255,.08);
  --border-strong: rgba(212,175,55,.35);
  --gold:          #D4AF37;
  --gold-soft:     #F6E8C3;
  --text:          #FFFFFF;
  --muted:         #B7B7B7;

  --font-display: 'Estedad', 'Vazirmatn', sans-serif;
  --font-body:    'Vazirmatn', sans-serif;
  --ease: cubic-bezier(.16,.84,.32,1);
}

*{ box-sizing:border-box; margin:0; padding:0; }

html,body{ height:100%; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display:flex;
  flex-direction:column;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

::selection{ background: var(--gold); color:#090909; }

/* ---------- ambient background glow (static, not scroll-linked) ---------- */
.ambient-glow{
  position: fixed;
  top: -10%;
  right: -15%;
  width: 60vw;
  height: 60vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.22), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-glow 8s ease-in-out infinite;
}
.ambient-glow-2{
  top: auto;
  bottom: -15%;
  right: auto;
  left: -15%;
  background: radial-gradient(circle, rgba(212,175,55,.14), transparent 70%);
  animation-delay: 2.5s;
}
@keyframes pulse-glow{
  0%, 100%{ opacity:.7; transform: scale(1); }
  50%{ opacity:1; transform: scale(1.12); }
}

/* ---------- layout ---------- */
.link-page{
  position: relative;
  z-index: 1;
  flex: 1;
  display:flex;
  align-items:center;
  padding: 28px 0 20px;
}
.container{
  width:100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- profile ---------- */
.profile{
  text-align:center;
  margin-bottom: 26px;
}
.avatar-frame{
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 18px;
}
.avatar-inner{
  width:100%; height:100%;
  border-radius: 50%;
  overflow:hidden;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border-strong), 0 20px 45px -15px rgba(0,0,0,.75);
}
.avatar-inner img{
  width:100%; height:100%; object-fit:cover;
  object-position: top center;
}
.avatar-ring{
  position:absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(212,175,55,.45);
  animation: spin-slow 18s linear infinite;
}
@keyframes spin-slow{ to{ transform: rotate(360deg); } }

.profile h1{
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold) 60%, #a9822a);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.profile .role{
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 4px;
}
.profile .role .dot{ color: var(--gold); margin: 0 4px; }
.profile .tagline{
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- link list ---------- */
.link-list{
  display:flex;
  flex-direction:column;
  gap: 11px;
}

.link-item{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  position: relative;
  isolation: isolate;
}
.link-item:hover, .link-item:active{
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: linear-gradient(160deg, rgba(212,175,55,.1), rgba(255,255,255,.02));
}

.link-icon{
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  position: relative;
  transition: transform .5s var(--ease);
}
.link-item:hover .link-icon{ transform: scale(1.08) rotate(-4deg); }

.link-icon svg{ width:100%; height:100%; }

/* halo glow that appears + spins behind the icon on hover */
.link-icon::before{
  content:"";
  position:absolute;
  inset:-5px;
  border-radius:50%;
  background: conic-gradient(from 0deg, transparent 0%, var(--gold-soft) 10%, var(--gold) 20%, transparent 38%);
  opacity:0;
  z-index:-1;
  transition: opacity .5s var(--ease);
  animation: spin-slow 2.6s linear infinite;
}
.link-item:hover .link-icon::before{ opacity:1; }

.link-text{
  flex:1;
  display:flex;
  flex-direction:column;
  gap: 2px;
  min-width:0;
}
.link-text strong{
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}
.link-text small{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.link-arrow{
  flex: 0 0 auto;
  width: 30px; height:30px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color: var(--gold);
  border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.link-item:hover .link-arrow{
  transform: translateX(-4px);
  border-color: var(--border-strong);
}
/* RTL: point arrow toward reading direction (left) already via translateX(-4px); flip chevron to point left visually */
.link-arrow svg{ transform: scaleX(-1); }

.link-item-phone{
  border-color: rgba(95,217,138,.3);
}
.link-item-phone .link-text strong{ color: var(--gold-soft); }

.footnote{
  text-align:center;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 22px;
  opacity: .7;
}

/* ---------- responsive tuning ---------- */
@media (max-width: 380px){
  .avatar-frame{ width:132px; height:132px; }
  .profile{ margin-bottom: 20px; }
  .profile h1{ font-size:20px; }
  .link-list{ gap: 9px; }
  .link-item{ padding: 10px 13px; gap:11px; border-radius: 16px; }
  .link-icon{ width:38px; height:38px; }
  .link-text strong{ font-size:13.5px; }
  .link-text small{ font-size: 11px; }
}

@media (min-width: 460px){
  .container{ max-width: 480px; }
}

@media (min-height: 780px){
  .link-page{ padding: 40px 0; }
}

/* ---------- accessibility ---------- */
a:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 12px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* ---------- button-style link item (no href, opens modal) ---------- */
.link-item-button{
  width:100%;
  text-align: inherit;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-color: rgba(212,175,55,.28);
}
button:focus-visible.link-item{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- advisor guide modal ---------- */
.modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  background: rgba(5,5,5,.72);
  backdrop-filter: blur(6px);
  animation: modal-fade .3s var(--ease);
}
.modal-overlay[hidden]{ display:none; }

@keyframes modal-fade{
  from{ opacity:0; }
  to{ opacity:1; }
}

.modal-box{
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 80dvh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 26px 22px 24px;
  box-shadow: 0 25px 60px -15px rgba(0,0,0,.8);
  animation: modal-pop .35s var(--ease);
}
@keyframes modal-pop{
  from{ opacity:0; transform: translateY(14px) scale(.97); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

.modal-close{
  position:absolute;
  top: 14px;
  left: 14px;
  width: 34px; height:34px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor:pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.modal-close:hover{
  background: rgba(212,175,55,.14);
  color: var(--gold);
  border-color: var(--border-strong);
}

.modal-box h2{
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
  padding-left: 40px;
  color: var(--gold-soft);
}

.modal-content{
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.modal-content p{ margin-bottom: 10px; }
.modal-content p:last-child{ margin-bottom: 0; }

@media (prefers-reduced-motion: reduce){
  .modal-overlay, .modal-box{ animation: none; }
}
