/* ============================================================
   MEMBERSHIP PAGE — فاطر حقوقی
   همان پالت هویت بصری سایت:
   ink:#12233F | ink-2:#1B3358 | gold:#B7935B | gold-light:#D9BD8C
   seal:#7A2E2E | paper:#F3EFE6 | paper-2:#FBF9F4
   charcoal:#262220 | charcoal-soft:#584F46 | line:#DCD2BE
   ============================================================ */

:root{
  --ink:#12233F;
  --ink-2:#1B3358;
  --gold:#B7935B;
  --gold-light:#D9BD8C;
  --seal:#7A2E2E;
  --paper:#F3EFE6;
  --paper-2:#FBF9F4;
  --charcoal:#262220;
  --charcoal-soft:#584F46;
  --line:#DCD2BE;
}

*{box-sizing:border-box;}
body{
  font-family:'Vazirmatn', sans-serif;
  background:var(--paper);
  color:var(--charcoal);
}
h1,h2,.font-naskh{font-family:'Noto Naskh Arabic', serif;}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px;}

/* ---------- top bar (simple, no menu) ---------- */
.mem-topbar{
  background:linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  padding:2.2rem 0 2.6rem;
  position:relative;
  overflow:hidden;
}
.mem-topbar::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(180deg, black, transparent 90%);
}
.mem-topbar .brand-lockup{
  display:flex; align-items:center; gap:.7rem;
  position:relative; z-index:1;
}
.mem-topbar .brand-lockup b{
  font-family:'Noto Naskh Arabic',serif;
  color:var(--paper-2);
  font-size:1.15rem;
  display:block;
}
.mem-topbar .brand-lockup span{
  color:var(--gold-light);
  font-size:.72rem;
}
.mem-topbar .page-title{
  position:relative; z-index:1;
  margin-top:1.6rem;
}
.mem-topbar .eyebrow{
  font-size:.8rem;
  letter-spacing:.1em;
  color:var(--gold-light);
  font-weight:600;
  display:flex; align-items:center; gap:.6rem;
}
.mem-topbar .eyebrow::before{
  content:"";
  width:26px; height:2px;
  background:var(--gold);
}
.mem-topbar h1{
  color:var(--paper-2);
  font-size:clamp(1.6rem, 4vw, 2.3rem);
  margin:.6rem 0 0;
}
.mem-topbar p{
  color:#CBD6E6;
  max-width:560px;
  margin:.8rem 0 0;
  line-height:1.95;
  font-size:.95rem;
}

/* ---------- form card ---------- */
.mem-wrap{padding:3.2rem 0 4.5rem;}
.mem-card{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:18px;
  padding:2.4rem;
  box-shadow:0 26px 60px -34px rgba(18,35,63,.28);
}
@media (max-width:575.98px){
  .mem-card{padding:1.5rem 1.1rem;}
}

.mem-section-title{
  display:flex; align-items:center; gap:.7rem;
  color:var(--ink);
  font-weight:700;
  font-size:1.05rem;
  margin-bottom:1.4rem;
}
.mem-section-title .seal-dot{
  width:30px; height:30px; border-radius:50%;
  background:var(--ink);
  color:var(--gold-light);
  display:flex; align-items:center; justify-content:center;
  flex:0 0 auto;
  font-family:'Noto Naskh Arabic',serif;
  font-size:.95rem;
}

.mem-card hr{
  border-color:var(--line);
  margin:2rem 0;
}

/* ---------- form fields ---------- */
.mem-card label{
  font-size:.88rem;
  font-weight:600;
  color:var(--ink);
  margin-bottom:.4rem;
  display:inline-block;
}
.mem-card label .req{color:var(--seal);margin-right:.15rem;}

.mem-card .form-control,
.mem-card .form-select{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:.65rem .9rem;
  font-family:'Vazirmatn', sans-serif;
  font-size:.92rem;
  color:var(--charcoal);
}
.mem-card .form-control:focus,
.mem-card .form-select:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 .2rem rgba(183,147,91,.18);
}
.mem-card .form-text{
  font-size:.78rem;
  color:var(--charcoal-soft);
  margin-top:.3rem;
}
.mem-card select:disabled{
  background:#F1EEE7;
  color:#9C927F;
  cursor:not-allowed;
}

/* bootstrap validation styling kept but recolored to match palette */
.mem-card .is-invalid{border-color:var(--seal) !important;}
.mem-card .invalid-feedback{color:var(--seal); font-size:.8rem;}
.mem-card .is-valid{border-color:#4E7A52 !important;}

/* ---------- submit + secondary actions ---------- */
.btn-gold{
  background:var(--gold);
  color:var(--ink);
  font-weight:700;
  border-radius:10px;
  padding:.75rem 2rem;
  border:none;
  transition:all .3s;
}
.btn-gold:hover{background:var(--gold-light); color:var(--ink);}
.btn-gold:disabled{opacity:.6; cursor:not-allowed;}

.btn-ghost-ink{
  background:transparent;
  border:1.5px solid var(--ink);
  color:var(--ink);
  font-weight:600;
  border-radius:10px;
  padding:.72rem 1.9rem;
  transition:all .3s;
  display:inline-flex; align-items:center; gap:.5rem;
}
.btn-ghost-ink:hover{background:var(--ink); color:var(--paper-2);}

.mem-actions{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  justify-content:space-between;
  align-items:center;
  margin-top:1rem;
}

.mem-note{
  font-size:.8rem;
  color:var(--charcoal-soft);
  margin-top:1.4rem;
}

/* required-field marker legend */
.legend-req{
  font-size:.78rem;
  color:var(--charcoal-soft);
  margin-bottom:1.6rem;
}
.legend-req .req{color:var(--seal);}
/* ---------- عکس پروفایل (۳×۴) ---------- */
.photo-upload-row{
  display:flex;
  gap:1rem;
  align-items:flex-start;
}
.photo-upload-box{
  position:relative;
  width:96px;
  aspect-ratio:3 / 4;
  border:2px dashed var(--line);
  border-radius:10px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  overflow:hidden;
  transition:border-color .3s, background .3s;
  flex:0 0 auto;
}
.photo-upload-box:hover,
.photo-upload-box:focus-visible{
  border-color:var(--gold);
  background:rgba(183,147,91,.05);
}
.photo-upload-placeholder{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.3rem;
  color:var(--charcoal-soft);
  font-size:.62rem;
  text-align:center;
  padding:0 .3rem;
  line-height:1.4;
}
.photo-preview-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.photo-remove-btn{
  position:absolute;
  top:4px;
  left:4px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:rgba(18,35,63,.75);
  color:#fff;
  border:none;
  font-size:.85rem;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.photo-remove-btn:hover{background:var(--seal);}
.photo-upload-info{flex:1 1 auto; padding-top:.2rem;}
.photo-error{color:var(--seal); font-size:.78rem; margin-top:.4rem;}