@font-face{font-family:Vazirmatn;src:url('Vazirmatn-Regular.woff2') format('woff2');font-weight:100 500;font-display:swap}@font-face{font-family:Vazirmatn;src:url('Vazirmatn-Bold.woff2') format('woff2');font-weight:600 900;font-display:swap}

/* ---------------------------------------------------------- توکن‌ها
   رنگ‌ها از تنظیمات قالب و صفحات همان سایت استخراج شده‌اند */
:root {
  --brand-blue:  #0F3089;
  --brand-navy:  #0F3089;
  --brand-red:   #e30b2b;
  --brand-amber: #e30b2b;
  --primary:     #0F3089;
  --secondary:   #0F3089;

  --bg:        #FFFFFC;
  --content:   #FFFFFC;
  --content-2: #FFFFFC;
  --border:    rgba(15,48,137,.15);
  --text:      #8B8982;
  --muted:     #8B8982;
  --heading:   #0F3089;

  --wrap: 1180px;
  --radius: 6px;
  --shadow: 0 8px 24px rgba(15,48,137,.10);
  --font: 'IRANSans', 'IRANSansWeb', 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
}

#main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
/* اگر پوشه‌ی uploads هنوز برنگشته باشد، جای تصویر خالی نماند */
.simg img, .card-media img, .single-hero img {
  min-height: 80px; background: var(--content-2);
}
img.na { visibility: hidden; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--brand-amber); outline-offset: 2px; }

.skip {
  position: absolute; right: -9999px; top: 0; z-index: 100;
  background: var(--brand-navy); color: #FFFFFC; padding: .6rem 1rem;
}
.skip:focus { right: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 780px); }
.muted { color: var(--muted); }

/* ---------------------------------------------------------- سربرگ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: #FFFFFC;
  box-shadow: 0 1px 8px rgba(15,48,137,.10);
}
.head-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 70px;
}
.brand img { height: 46px; width: auto; }
.brand-text { font-weight: 700; color: var(--brand-navy); font-size: 1.15rem; }

.site-nav { margin-inline-start: auto; }
.site-nav ul {
  list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0;
}
.site-nav a {
  display: block; padding: .55rem .8rem;
  color: #0F3089; font-size: .97rem; border-radius: var(--radius);
}
.site-nav a:hover { background: var(--primary); color: #FFFFFC; }
.site-nav a.active { color: var(--primary); font-weight: 700; }
.site-nav a.active:hover { color: #FFFFFC; }

.burger {
  display: none; margin-inline-start: auto;
  background: none; border: 0; padding: .5rem; cursor: pointer;
}
.burger span {
  display: block; width: 24px; height: 2px; background: #0F3089; margin: 5px 0;
  transition: transform .2s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; }
  .site-nav {
    position: absolute; inset-inline: 0; top: 100%;
    background: #FFFFFC; box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem; }
  .site-nav a { padding: .8rem; }
}

/* ---------------------------------------------------------- هیرو */
.hero { position: relative; background: #0F3089; min-height: clamp(340px, 46vw, 620px); }
.hero-img {
  width: 100%; height: clamp(340px, 46vw, 620px);
  object-fit: cover; font-size: 0; color: transparent;
}
.hero-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  background: linear-gradient(to left, rgba(15,48,137,.78), rgba(15,48,137,.18));
  color: #FFFFFC;
}
.hero-overlay h1 { color: #FFFFFC; margin-bottom: .3em; }
.hero-overlay p { font-size: 1.1rem; max-width: 34ch; margin-bottom: 1.4em; }
@media (max-width: 700px) {
  .hero-img { min-height: 320px; object-fit: cover; }
  .hero-overlay { background: rgba(15,48,137,.68); }
}

/* ---------------------------------------------------------- عنوان صفحه */
.pagehead {
  background: var(--brand-navy);
  color: #FFFFFC;
  padding: 2.6rem 0 2.2rem;
}
.pagehead h1 { color: #FFFFFC; margin: 0; }
.pagehead p { margin: .4rem 0 0; opacity: .8; }

/* ---------------------------------------------------------- ردیف و ستون */
.row {
  background: var(--row-bg, var(--content));
  color: var(--row-fg, inherit);
  padding-block: 3rem;
}
.row--img {
  background-image: var(--row-img);
  background-size: cover;
  background-position: center;
}
.row.h-auto   { padding-block: 0; }
.row.h-small  { padding-block: 1.6rem; }
.row.h-medium { padding-block: 3rem; }
.row.h-large  { padding-block: 4.5rem; }
.row.h-huge   { padding-block: 6rem; }
.row.h-full   { padding-block: 6rem; }
.row.sch-alternate { background: var(--row-bg, var(--content-2)); }
.row.sch-primary   { background: var(--row-bg, var(--primary)); color: #FFFFFC; }
.row.sch-secondary { background: var(--row-bg, var(--secondary)); color: #FFFFFC; }
.row.sch-primary h1, .row.sch-primary h2, .row.sch-primary h3,
.row.sch-secondary h1, .row.sch-secondary h2, .row.sch-secondary h3 { color: #FFFFFC; }
.row--full > .wrap { width: 100%; }

.cols {
  display: flex; flex-wrap: wrap;
  gap: 1.6rem;
  align-items: flex-start;
}
.cols--inner { width: 100%; gap: 1.2rem; }
.col {
  flex: 1 1 calc(var(--w, 100%) - 1.6rem);
  max-width: 100%;
  min-width: 220px;
}
.col-link { color: inherit; display: block; }
@media (max-width: 860px) {
  .col { flex-basis: 100%; }
}

/* ---------------------------------------------------------- متن */
.txt > :last-child { margin-bottom: 0; }
.txt img { margin-inline: auto; border-radius: var(--radius); }
.txt h2 { margin-top: 1.4em; }
.txt ul, .txt ol { padding-inline-start: 1.4rem; }
.txt a { text-decoration: underline; text-underline-offset: 3px; }
.fig { margin: 1.5rem 0; }
.fig figcaption {
  font-size: .9rem; color: var(--muted); text-align: center; padding-top: .5rem;
}
.ch { margin: 0 0 .5em; }

/* ---------------------------------------------------------- آیکون‌باکس */
.ico { width: var(--s, 24px); height: var(--s, 24px); flex: none; }
.ico.flip { transform: scaleX(-1); }

.iconbox { display: block; color: inherit; }
.iconbox .ib-title { margin: 0; font-size: 1.02rem; font-weight: 600; }
.iconbox .ib-body > :last-child { margin-bottom: 0; }
.ib-img { width: var(--s, 60px); height: auto; }

.ib-top { text-align: center; }
.ib-top .ib-media { display: flex; justify-content: center; margin-bottom: .7rem; }
.ib-top .ib-img { margin-inline: auto; }

.ib-left {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-bottom: .55rem;
}
.ib-left .ib-media { padding-top: .35rem; color: var(--primary); }
.ib-left .ib-title { font-weight: 500; font-size: 1rem; line-height: 1.8; }

a.iconbox:hover .ib-title { color: var(--primary); }

/* کاشی‌های رنگی صفحه‌ی اصلی */
.cbox {
  display: block;
  background: var(--box-bg, var(--brand-blue));
  color: #FFFFFC;
  padding-top: var(--box-pt, 20px);
  padding-bottom: var(--box-pb, 20px);
  padding-inline: 1rem;
  border-radius: var(--radius);
  transition: filter .25s ease, transform .25s ease;
  height: 100%;
}
.cbox:hover { filter: brightness(1.12); transform: translateY(-2px); color: #FFFFFC; }
.cbox .ib-title { color: #FFFFFC; }
.cbox .iconbox { color: #FFFFFC; }
.cbox .ib-media { color: inherit; }

/* ---------------------------------------------------------- تصویر */
.simg { margin: 0 0 1rem; }
.simg img { border-radius: var(--radius); }
.simg--shadow img { box-shadow: var(--shadow); }
.simg--center { text-align: center; }
.simg--center img { margin-inline: auto; }

/* ---------------------------------------------------------- جداکننده / دکمه */
.sep { height: 1px; background: var(--border); margin: 1.6rem 0; }
.sep--small { margin: .9rem 0; }
.sep--large { margin: 2.4rem 0; }
.sep--blank { background: none; }

.btn-wrap { margin: 1rem 0; }
.btn-wrap .btn--center { margin-inline: auto; }
.btn {
  display: inline-block;
  background: var(--brand-blue); color: #FFFFFC;
  padding: .7rem 1.6rem; border: 2px solid var(--brand-blue);
  border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: var(--secondary); border-color: var(--secondary); color: #FFFFFC; }
.btn--outline { background: transparent; color: currentColor; border-color: currentColor; }
.btn--outline:hover { background: #FFFFFC; color: var(--secondary); border-color: #FFFFFC; }

.cta {
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  align-items: center; justify-content: center;
}
.cta-title { margin: 0; font-size: 1.1rem; font-weight: 600; }

/* ---------------------------------------------------------- کاروسل */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1.2rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .5rem;
  scrollbar-width: thin;
}
.carousel-track > * {
  flex: 0 0 clamp(200px, 30%, 300px);
  scroll-snap-align: start;
  text-align: center;
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: #FFFFFC; border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow);
}
.carousel-nav.prev { inset-inline-start: -6px; }
.carousel-nav.next { inset-inline-end: -6px; }
.carousel-nav:hover { background: var(--primary); color: #FFFFFC; border-color: var(--primary); }

.logos { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: center; }
.logos img { max-height: 60px; width: auto; filter: grayscale(1); opacity: .75; }
.logos img:hover { filter: none; opacity: 1; }

.imgslider .carousel-track > img { flex: 0 0 100%; border-radius: var(--radius); }

/* ---------------------------------------------------------- کارت‌های خبر */
.cards {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: #FFFFFC; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .25s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card a { color: inherit; display: block; height: 100%; }
.card-media { aspect-ratio: 3 / 2; background: var(--content-2); overflow: hidden; }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .4s ease; /* Task 4: skeleton -> fade-in reveal */
}
.card-media img.is-loaded { opacity: 1; }
.card-media.img-error img { display: none; } /* broken image URL: keep the gray skeleton, hide the broken-image icon */
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-body h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.card-body p { font-size: .92rem; color: var(--muted); margin-bottom: .6rem; }
.card-body time { font-size: .82rem; color: var(--muted); }

/* ---------------------------------------------------------- نوشته‌ی تکی */
.single { background: #FFFFFC; padding: 3rem 0; }
.single-hero { margin: 0 0 2rem; }
.single-hero img { width: 100%; border-radius: var(--radius); }
.single .txt { font-size: 1.03rem; }
.single .txt img { margin: 1.5rem auto; }
.back { margin-top: 2.5rem; }
.back a { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------------------------------------------------------- فرم / نقشه */
.cform { display: grid; gap: .9rem; }
.cform label { display: grid; gap: .35rem; font-size: .93rem; font-weight: 600; }
.cform input, .cform textarea {
  font: inherit; font-weight: 400;
  padding: .7rem .8rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #FFFFFC; color: inherit;
}
.cform input:focus, .cform textarea:focus { border-color: var(--primary); }
.cform .btn { justify-self: start; }
.cform-note { font-size: .82rem; color: var(--muted); margin: 0; }

.map iframe { width: 100%; height: 420px; border: 0; display: block; }

.progbar { margin-bottom: 1rem; }
.pb-head { display: flex; justify-content: space-between; font-size: .9rem; }
.pb-track { background: var(--content-2); height: 8px; border-radius: 99px; overflow: hidden; }
.pb-track span { display: block; height: 100%; background: var(--primary); }
.counter { text-align: center; }
.counter b { display: block; font-size: 2.4rem; color: var(--primary); }
.pricing { background: #FFFFFC; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.pricing .price { font-size: 1.8rem; color: var(--primary); font-weight: 700; }

/* ---------------------------------------------------------- پاورقی */
.site-foot { background: #0F3089; color: #8B8982; padding-top: 3rem; }
.foot-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding-bottom: 2.5rem;
}
.foot-brand { font-size: 1.15rem; font-weight: 700; color: #FFFFFC; margin-bottom: .3rem; }
.foot-desc { color: #8B8982; margin: 0; }
.foot-contact, .foot-menu { list-style: none; margin: 0; padding: 0; }
.foot-contact li {
  display: flex; gap: .6rem; align-items: flex-start;
  margin-bottom: .6rem; font-size: .93rem; line-height: 1.9;
}
.foot-contact .ico { margin-top: .45rem; color: var(--brand-amber); }
.foot-contact a, .foot-menu a { color: #8B8982; }
.foot-contact a:hover, .foot-menu a:hover { color: #FFFFFC; }
.foot-menu li { margin-bottom: .4rem; font-size: .93rem; }
.foot-social {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .8rem; color: #8B8982;
}
.foot-social:hover { color: #FFFFFC; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,252,.12);
  padding: 1rem 0; font-size: .88rem; color: #8B8982;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
