@font-face {
  font-family: "IRANSans";
  src: url("/fonts/iran-sans/woff2/IRANSansWeb(FaNum)_UltraLight.woff2") format("woff2"),
       url("/fonts/iran-sans/woff/IRANSansWeb(FaNum)_UltraLight.woff") format("woff");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("/fonts/iran-sans/woff2/IRANSansWeb(FaNum)_Light.woff2") format("woff2"),
       url("/fonts/iran-sans/woff/IRANSansWeb(FaNum)_Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("/fonts/iran-sans/woff2/IRANSansWeb(FaNum).woff2") format("woff2"),
       url("/fonts/iran-sans/woff/IRANSansWeb(FaNum).woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("/fonts/iran-sans/woff2/IRANSansWeb(FaNum)_Medium.woff2") format("woff2"),
       url("/fonts/iran-sans/woff/IRANSansWeb(FaNum)_Medium.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("/fonts/iran-sans/woff2/IRANSansWeb(FaNum)_Bold.woff2") format("woff2"),
       url("/fonts/iran-sans/woff/IRANSansWeb(FaNum)_Bold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17202a;
  --muted: #6a7780;
  --paper: #f7fbfb;
  --surface: #ffffff;
  --surface-soft: #eef7f7;
  --turquoise: #0f8b8d;
  --turquoise-dark: #0b5f66;
  --navy: #123047;
  --amber: #f2c14e;
  --coral: #e56b5d;
  --line: rgba(18, 48, 71, .11);
  --shadow: 0 18px 45px rgba(18, 48, 71, .08);
  --sidebar: 176px;
}

html { font-size: 15px; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfefe 0%, var(--paper) 54%, #f4f8f7 100%);
  font-family: "IRANSans", Tahoma, Arial, sans-serif;
  font-weight: 400;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a { color: var(--turquoise-dark); text-decoration: none; }
a:hover { color: var(--coral); }
img, video { max-width: 100%; }
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-shell {
  width: min(1120px, calc(100% - 24px));
  margin-inline: auto;
}

.navbar { padding-block: .7rem; }
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--navy);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--turquoise), var(--navy));
  box-shadow: 0 12px 24px rgba(15, 139, 141, .18);
}

.navbar-collapse { align-items: center; }
.navbar-nav { gap: .2rem; }
.nav-link {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  border-radius: 8px;
  padding: .62rem .75rem;
}
.nav-link:hover { background: var(--surface-soft); color: var(--turquoise-dark); }
.navbar-toggler { border: 1px solid var(--line); border-radius: 8px; }

.submit-call,
.btn-primaryish,
.btn-quiet,
.load-more button,
.form-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 8px;
  padding: .72rem 1rem;
  font-weight: 800;
}

.submit-call,
.btn-primaryish,
.load-more button,
.form-actions button {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--turquoise), var(--navy));
  box-shadow: 0 14px 28px rgba(15, 139, 141, .18);
}

.submit-call:hover,
.btn-primaryish:hover,
.load-more button:hover,
.form-actions button:hover {
  color: #fff;
  transform: translateY(-1px);
}

.btn-quiet {
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--line);
}

.inline-form {
  display: inline-flex;
  margin-inline-start: .45rem;
}

.btn-dangerish {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: .45rem .7rem;
  color: #fff;
  background: var(--coral);
  font-weight: 800;
}

.page-wrap { min-height: 70vh; }

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softReveal {
  from {
    opacity: 0;
    transform: scale(.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-copy,
.leader-visual,
.memorial-banner,
.section-head,
.form-surface,
.admin-surface,
.slider {
  animation: fadeRise .58s ease both;
}

.leader-visual,
.slider {
  animation-name: softReveal;
}

.story-card {
  animation: fadeRise .52s ease both;
}

.story-card:nth-child(2) { animation-delay: .04s; }
.story-card:nth-child(3) { animation-delay: .08s; }
.story-card:nth-child(4) { animation-delay: .12s; }
.story-card:nth-child(5) { animation-delay: .16s; }
.story-card:nth-child(6) { animation-delay: .2s; }

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: center;
  padding: 2rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.65rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--navy);
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 2.05;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.leader-visual {
  min-height: 430px;
  border-radius: 8px;
  background: var(--navy);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: transform .32s ease, box-shadow .32s ease;
}

.leader-visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  display: block;
  transition: transform .42s ease, filter .42s ease;
}

.leader-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 20%, rgba(242, 193, 78, .28), transparent 28%),
    linear-gradient(180deg, transparent 52%, rgba(18, 48, 71, .62));
  opacity: .82;
  transition: opacity .32s ease;
}

.leader-visual:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 56px rgba(18, 48, 71, .16);
}

.leader-visual:hover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.04);
}

.leader-visual:hover::after {
  opacity: 1;
}

.top-memorial {
  padding: 1.2rem 0 0;
}

.top-memorial img {
  display: block;
  width: min(920px, 100%);
  height: auto;
  margin-inline: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section { padding: 2.8rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.1rem;
}
.section-head h2 { margin: 0; color: var(--navy); font-size: 1.45rem; font-weight: 800; }
.section-head p { margin: .3rem 0 0; color: var(--muted); }
.content-band { background: rgba(255,255,255,.66); border-block: 1px solid var(--line); }

.slider {
  position: relative;
  min-height: 330px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.slider-track {
  height: 100%;
  display: flex;
  transition: transform .55s ease;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 330px;
  overflow: hidden;
  background: var(--navy);
}

.slide img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  opacity: .78;
  display: block;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 48, 71, .15), rgba(18, 48, 71, .72));
}

.slide-content {
  position: absolute;
  z-index: 1;
  inset-inline: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 2.4rem);
  max-width: 620px;
  color: #fff;
}

.slide-content strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  line-height: 1.6;
}

.slide-content small {
  display: block;
  margin-top: .4rem;
  color: rgba(255,255,255,.82);
  font-size: .98rem;
  line-height: 2;
}

.slider-controls {
  position: absolute;
  z-index: 2;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  gap: .45rem;
}

.slider-controls button,
.slider-dots button {
  border: 0;
  color: var(--navy);
  background: rgba(255,255,255,.92);
}

.slider-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.55rem;
  line-height: 1;
}

.slider-dots {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 1.55rem;
  display: flex;
  gap: .35rem;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  opacity: .55;
}

.slider-dots button.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--amber);
  opacity: 1;
}

.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.story-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(18, 48, 71, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 139, 141, .26);
  box-shadow: 0 18px 36px rgba(18, 48, 71, .1);
}
.story-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-soft); }
.story-card-body { padding: 1rem; }
.story-card h3 { margin: 0 0 .55rem; font-size: 1.02rem; line-height: 1.75; font-weight: 800; }
.story-card p { color: var(--muted); line-height: 1.9; margin: 0; font-size: .92rem; }
.meta { color: var(--turquoise-dark); font-size: .84rem; font-weight: 800; }
.load-more { display: grid; place-items: center; margin-top: 1.5rem; }

.form-surface, .admin-surface {
  width: min(900px, calc(100% - 28px));
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 2rem);
}

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .45rem; font-weight: 800; color: var(--navy); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: .7rem .85rem;
  background: #fcfefe;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(15, 139, 141, .16);
  border-color: rgba(15, 139, 141, .55);
}
.field textarea { min-height: 150px; resize: vertical; }
.field small { color: var(--muted); font-weight: 400; }
.validation-summary-errors, .text-danger { color: var(--coral); }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.upload-field {
  display: grid;
  gap: .7rem;
}

.upload-drop {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: .45rem;
  padding: 1rem;
  text-align: center;
  border: 1.5px dashed rgba(15, 139, 141, .35);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.upload-drop strong {
  color: var(--navy);
  font-size: 1rem;
}

.upload-drop span {
  color: var(--muted);
  font-size: .88rem;
}

.upload-field.is-dragging .upload-drop {
  transform: translateY(-2px);
  border-color: var(--turquoise);
  box-shadow: 0 16px 34px rgba(15, 139, 141, .12);
}

.upload-list {
  display: grid;
  gap: .45rem;
}

.upload-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .7rem;
  align-items: center;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.upload-item span {
  min-width: 0;
}

.upload-item strong,
.upload-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item strong {
  color: var(--navy);
  font-size: .9rem;
}

.upload-item button {
  border: 0;
  border-radius: 8px;
  padding: .45rem .7rem;
  color: #fff;
  background: var(--coral);
  font-weight: 800;
}

.upload-progress {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.upload-progress span {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 0;
  background: linear-gradient(135deg, var(--turquoise), var(--navy));
  transition: width .16s ease;
}

.upload-progress b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--navy);
  font-size: .82rem;
}

.voice-recorder {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--surface-soft));
}

.voice-recorder-main {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}

.voice-recorder-main span {
  color: var(--muted);
  font-size: .9rem;
}

.voice-recorder-main b {
  margin-inline-start: auto;
  min-width: 54px;
  color: var(--turquoise-dark);
  font-size: 1rem;
  text-align: center;
}

.voice-recorder audio {
  width: 100%;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) 1fr;
  gap: .7rem;
  align-items: center;
}

.captcha-image {
  min-height: 44px;
  width: 100%;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.jalali-picker {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .6rem;
}

.jalali-picker input { min-width: 0; }
.jalali-picker .btn-quiet { min-height: 44px; white-space: nowrap; }

.jalali-panel {
  position: absolute;
  z-index: 30;
  inset-inline: 0;
  top: calc(100% + .45rem);
  max-width: 360px;
  margin-inline-start: auto;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.jalali-panel[hidden] { display: none; }
.jalali-controls { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .65rem; }
.jalali-weekdays,
.jalali-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .3rem;
}

.jalali-weekdays span {
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
}

.jalali-days button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
}

.jalali-days button:hover,
.jalali-days button.is-selected {
  color: #fff;
  background: var(--turquoise);
}

.jalali-days .empty { min-height: 36px; }

.step-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.2rem; }
.step-list span { border: 1px solid var(--line); border-radius: 8px; padding: .6rem; text-align: center; color: var(--muted); }
.step-list .active { color: #fff; background: var(--turquoise); }

.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.admin-nav a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .75rem; font-weight: 800; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }

.site-footer { margin-top: 3rem; padding: 2rem 0; background: var(--navy); color: rgba(255,255,255,.82); }
.site-footer a { color: #fff; display: inline-block; margin-inline-end: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.footer-social {
  margin-top: 1rem;
}

.footer-social > span {
  display: block;
  margin-bottom: .55rem;
  color: rgba(255,255,255,.78);
  font-size: .9rem;
  font-weight: 800;
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.footer-social-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.footer-social-links a:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.28);
}

.footer-social-links img {
  width: 28px;
  height: 28px;
  display: block;
}

.update-banner {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  gap: .8rem;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-right: 5px solid var(--turquoise);
  box-shadow: var(--shadow);
  padding: .85rem;
  border-radius: 8px;
}
.update-banner[hidden] { display: none; }
.update-banner button { border: 0; border-radius: 8px; padding: .65rem .9rem; color: #fff; background: var(--turquoise); font-weight: 800; }

@media (min-width: 992px) {
  body { padding-right: var(--sidebar); }

  .site-header {
    position: fixed;
    inset: 0 0 0 auto;
    width: var(--sidebar);
    border-bottom: 0;
    border-left: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
  }

  .site-header .navbar {
    height: 100%;
    padding: 1rem .8rem;
    align-items: stretch;
  }

  .nav-shell {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .navbar-brand {
    flex-direction: column;
    justify-content: center;
    gap: .55rem;
    min-height: 96px;
    text-align: center;
    font-size: .9rem;
    line-height: 1.7;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
  }

  .navbar-collapse {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    width: 100%;
  }

  .site-header .navbar-expand-lg .navbar-nav,
  .site-header .navbar-nav {
    flex-direction: column;
    gap: .25rem;
    width: 100%;
    margin-top: .75rem;
    margin-inline: 0;
  }

  .site-header .navbar-nav .nav-item {
    width: 100%;
  }

  .nav-link {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 46px;
    text-align: center;
    padding: .5rem .35rem;
    font-size: .88rem;
    line-height: 1.65;
    white-space: normal;
  }

  .submit-call {
    width: calc(100% - .35rem);
    max-width: 100%;
    margin-top: auto;
    margin-inline: auto;
    min-height: 44px;
    padding: .58rem .6rem;
    text-align: center;
    line-height: 1.6;
    white-space: normal;
    font-size: .86rem;
  }

  .app-content,
  .site-footer {
    margin-right: 0;
  }
}

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

@media (max-width: 991.98px) {
  .site-header { position: sticky; }
  .hero { min-height: auto; padding-top: 1.4rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .leader-visual, .leader-visual img { min-height: 320px; }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .navbar-collapse { margin-top: .8rem; }
  .navbar-nav { margin-bottom: .8rem; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 1120px); }
  .nav-shell { width: min(100% - 20px, 1120px); }
  .hero-copy h1 { font-size: 2.1rem; }
  .hero-copy p { font-size: .95rem; }
  .story-grid { grid-template-columns: 1fr; }
  .submit-call { width: 100%; margin-top: .75rem; }
  .section-head { display: block; }
  .slider, .slide, .slide img { min-height: 270px; }
  .slider-controls { left: .75rem; bottom: .75rem; }
  .slider-dots { right: .75rem; bottom: 1.2rem; }
  .update-banner { align-items: stretch; flex-direction: column; }
  .jalali-picker { grid-template-columns: 1fr; }
  .jalali-picker .btn-quiet { width: 100%; }
  .jalali-panel { max-width: none; }
  .captcha-row { grid-template-columns: 1fr; }
}
