/* ══════════════════════════════════════════════════════
   Public Site — هیئت امنای مسکن دادگستری زنجان
   Design System: Authority Navy + Trust Gold (institutional)
   ══════════════════════════════════════════════════════ */

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

:root {
  --p-navy:      #0E1B32;
  --p-navy-h:    #162644;
  --p-gold:      #B8945A;
  --p-gold-h:    #CBA56A;
  --p-gold-deep: #8E6E3C;
  --p-bg:        #F2EDE3;
  --p-card:      #FFFFFF;
  --p-text:      #1A2035;
  --p-text2:     #374158;
  --p-muted:     #6A6354;
  --p-muted2:    #9A9080;
  --p-border:    #D8D0BC;
  --p-border-soft: #E8E0CE;

  --p-r:  10px;
  --p-r2: 14px;
  --p-r3: 18px;

  --p-sh-s: 0 2px 10px rgba(20,24,40,.06), 0 1px 3px rgba(20,24,40,.04);
  --p-sh-m: 0 10px 32px rgba(20,24,40,.10), 0 2px 8px rgba(20,24,40,.05);
  --p-sh-l: 0 18px 48px rgba(20,24,40,.14), 0 4px 14px rgba(20,24,40,.06);

  --p-ease: cubic-bezier(.16,1,.3,1);
  --p-t:    .22s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }

body.pub {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  background: var(--p-bg);
  color: var(--p-text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

body.pub :focus-visible {
  outline: 2.5px solid var(--p-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

body.pub a, body.pub button { cursor: pointer; }

/* ══ LIQUID GLASS ══════════════════════════════════════ */
.liquid-glass {
  background: rgba(0, 0, 0, .4);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,.3) 0%, rgba(255,255,255,.1) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,.1) 80%, rgba(255,255,255,.3) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ══ NAVBAR ═══════════════════════════════════════════ */
.pub-nav-wrap {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 100;
  padding: 24px 20px 0;
}
@media (min-width: 768px)  { .pub-nav-wrap { padding-inline: 48px; } }
@media (min-width: 1024px) { .pub-nav-wrap { padding-inline: 64px; } }

.pub-nav {
  border-radius: var(--p-r3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .3s ease, box-shadow .3s ease;
}

.pub-nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pub-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-nav-logo {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--p-gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(184,148,90,.4);
}

.pub-nav-name {
  color: #F5F1E6;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  max-width: 300px;
  line-height: 1.3;
}

/* دکمه ورود در navbar */
.pub-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  background: #fff;
  color: #0E1526;
  padding: 9px 22px;
  border-radius: var(--p-r);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background .15s ease;
  flex-shrink: 0;
}
.pub-nav-btn:hover { background: #E8E4D8; }
.pub-nav-btn:active { transform: scale(.97); }

/* ══ HERO ══════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  max-height: 1000px;
  background: #080E1C;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#scene {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* بدون overlay تیره — ویدیو/تصویر بدون افکت روی آن نمایش داده می‌شود */
.hero-overlay { display: none; }

/* ── اسلایدها (فقط تصویر/ویدیو پس‌زمینه خام — بدون overlay) ── */
.slides-wrap {
  position: absolute; inset: 0;
  z-index: 0;
  will-change: transform;
}

.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.slide.on { opacity: 1; }

/* ── Video slide ────────────────────────────────────── */
.slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ── محتوای hero — پایین صفحه، grid دو‌ستونه ─────────── */
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 100px 20px 48px;
  gap: 28px;
  will-change: transform, opacity;
}
@media (min-width: 768px)  { .hero-content { padding-inline: 56px; } }
@media (min-width: 1024px) {
  .hero-content {
    padding-inline: 80px;
    padding-bottom: 72px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
    gap: 32px;
  }
}

.hero-main { max-width: 640px; }

.hero-mark { display: none; }

.hero-h1 {
  color: #F5F1E6;
  font-size: clamp(28px, 5.5vw, 52px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -.01em;
  margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(8,14,28,.7), 0 1px 4px rgba(8,14,28,.5);
}
.hero-h1 .char {
  display: inline-block;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.hero-h1 .char.in { opacity: 1; transform: translateX(0); }

.hero-p {
  color: #D8E4EE;
  font-size: 17px;
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 24px;
  opacity: 0;
  transition: opacity 1s ease;
  text-shadow: 0 1px 12px rgba(8,14,28,.6);
}
.hero-p.in { opacity: 1; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-actions.in { opacity: 1; }

.hero-btn-solid {
  background: #fff;
  color: #0E1526;
  padding: 13px 30px;
  border-radius: var(--p-r);
  font-weight: 700;
  font-size: 14px;
  transition: background .2s;
}
.hero-btn-solid:hover { background: #E8E4D8; }

.hero-btn-glass {
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 13px 30px;
  border-radius: var(--p-r);
  font-weight: 700;
  font-size: 14px;
  transition: background .2s, color .2s;
}
.hero-btn-glass:hover { background: #fff; color: #0E1526; }

.hero-tag-wrap {
  display: flex;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-tag-wrap.in { opacity: 1; }
@media (min-width: 1024px) { .hero-tag-wrap { justify-content: flex-end; } }

.hero-tag {
  padding: 12px 24px;
  border-radius: var(--p-r2);
  border: 1px solid rgba(255,255,255,.2);
  color: #F5F1E6;
  font-size: 15px;
  font-weight: 300;
  white-space: nowrap;
}

/* ── Cinematic letterbox bars (fade in after load) ───── */
.hero-bar {
  position: absolute; right: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--p-gold-h), transparent);
  opacity: 0;
  transition: opacity 1.2s ease 1.6s, transform 1.4s var(--p-ease) 1.6s;
  z-index: 3;
  pointer-events: none;
}
.hero-bar.top    { top: 0;    transform: scaleX(.3); }
.hero-bar.bottom { bottom: 0; transform: scaleX(.3); }
.hero-bar.in     { opacity: .55; transform: scaleX(1); }

/* ── Scroll reveal ─────────────────────────────────────
   عناصر دارای کلاس reveal با IntersectionObserver هنگام
   ورود به viewport کلاس in را می‌گیرند. */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--p-ease), transform .8s var(--p-ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Slider controls ────────────────────────────────── */
.s-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.s-btn:hover { background: rgba(0,0,0,.6); transform: translateY(-50%) scale(1.08); }
.s-btn:active { transform: translateY(-50%) scale(.95); }
.s-btn:focus-visible { outline-offset: 3px; }
.s-prev { right: 16px; }
.s-next { left: 16px; }

.slider-dots {
  position: absolute;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px;
  z-index: 3;
}
.sdot {
  width: 8px; height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: all .3s ease;
}
.sdot.on { width: 26px; background: var(--p-gold); }

/* ══ SECTIONS ══════════════════════════════════════════ */
.pub-section { padding: 88px 20px; }
.pub-section.sec-alt { background: var(--p-card); }
.pub-container { max-width: 1100px; margin: 0 auto; }

.sec-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(184,148,90,.12);
  color: var(--p-gold-deep);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 12px;
}
.sec-h2 {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 900;
  color: var(--p-text);
  line-height: 1.3;
  margin-bottom: 40px;
}
.sec-h2 span { color: var(--p-gold-deep); }

/* ══ ANNOUNCEMENTS ═════════════════════════════════════ */
.ann-list { max-width: 820px; }
.ann-item {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-r2);
  overflow: hidden;
  margin-bottom: 12px;
  transition: box-shadow var(--p-t) var(--p-ease), border-color var(--p-t) var(--p-ease);
}
.ann-item:hover { box-shadow: var(--p-sh-s); border-color: #C8BFA8; }
.ann-item.open { border-color: var(--p-gold); box-shadow: var(--p-sh-m); }
.ann-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer; user-select: none;
  transition: background .15s;
  min-height: 44px;
}
.ann-head:hover { background: #F9F5EC; }
.ann-head:focus-visible { outline-offset: -3px; }
.ann-title { font-weight: 700; font-size: 14.5px; }
.ann-date  { font-size: 11.5px; color: var(--p-muted2); margin-top: 3px; }
.ann-arrow { color: var(--p-gold-deep); font-size: 18px; transition: transform .25s var(--p-ease); flex-shrink: 0; margin-right: 12px; }
.ann-item.open .ann-arrow { transform: rotate(180deg); }
.ann-body {
  display: none;
  padding: 4px 20px 18px;
  font-size: 13.5px; line-height: 1.9; color: var(--p-text2);
  border-top: 1px solid var(--p-border-soft);
}
.ann-item.open .ann-body { display: block; }
.ann-img-wrap {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 480px;
}
.ann-img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: #F0EAD8;
}

/* ══ PROJECTS ══════════════════════════════════════════ */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 22px; }
.proj-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-r3);
  overflow: hidden;
  transition: transform var(--p-t) var(--p-ease), box-shadow var(--p-t) var(--p-ease);
}
.proj-card:hover { transform: translateY(-4px); box-shadow: var(--p-sh-l); }

/* تصویر پروژه */
.proj-thumb {
  height: 200px;
  background: var(--p-navy);
  position: relative;
  overflow: hidden;
}
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.proj-card:hover .proj-thumb img { transform: scale(1.04); }
.proj-ph { height: 100%; display: flex; align-items: center; justify-content: center; }
.proj-status {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.status-active    { color: #68CCA8; }
.status-completed { color: #9DAFC4; }
.status-upcoming  { color: #D4A040; }

.proj-body { padding: 18px; }
.proj-body h3 { font-size: 15px; font-weight: 800; margin-bottom: 7px; color: var(--p-text); }
.proj-body p  { font-size: 13px; color: var(--p-text2); line-height: 1.8; margin-bottom: 12px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-map { margin-top: 14px; border-radius: var(--p-r2); overflow: hidden; }
.proj-tag  {
  background: var(--p-bg); color: var(--p-text2);
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}

/* ══ FOOTER ═══════════════════════════════════════════ */
.pub-footer { background: var(--p-navy); color: #6C84A4; padding: 48px 20px 28px; }
.footer-top {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid #162035;
  margin-bottom: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-logo  { width: 34px; height: 34px; background: var(--p-gold); border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.footer-brand-name { color: #F0EAD8; font-size: 14px; font-weight: 800; }
.footer-info { font-size: 13px; line-height: 2; }
.footer-copy { max-width: 1100px; margin: 0 auto; text-align: center; font-size: 12px; }


/* ── Project Members (public page) ─────────────────── */
.proj-members {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--p-border-soft);
}
.proj-members-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--p-gold);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}
.proj-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--p-border-soft);
}
.proj-member-row:last-child { border-bottom: none; }
.proj-member-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p-navy), var(--p-navy-h));
  color: var(--p-gold);
  font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--p-border-soft);
  object-fit: cover;
}
.proj-member-name { font-size: 13px; font-weight: 700; color: var(--p-text); }
.proj-member-role { font-size: 11px; color: var(--p-muted2); margin-top: 1px; }
.proj-member-phone {
  margin-right: auto;
  font-size: 11.5px;
  color: var(--p-muted);
  font-family: monospace;
  flex-shrink: 0;
}

/* ══ ANIMATIONS ════════════════════════════════════════ */
@keyframes bounceIn {
  0%   { transform: scale(.4); opacity: 0; }
  60%  { transform: scale(1.08); }
  80%  { transform: scale(.96); }
  100% { transform: scale(1); opacity: 1; }
}

/* ══ RESPONSIVE ════════════════════════════════════════ */
@media (max-width: 768px) {
  .pub-nav-name { font-size: 12px; max-width: 180px; }
  .pub-section  { padding: 56px 16px; }
  .sec-h2       { margin-bottom: 28px; }
  .proj-grid    { grid-template-columns: 1fr; }
  .footer-top   { flex-direction: column; }
  .hero-content { padding-top: 96px; }
}

@media (max-width: 440px) {
  .pub-nav-name { display: none; }
}
