/* =========================================================
   زنجان ۳۶۰ — Online-Services / style.css
   هویت بصری: زرد غالب + بنفش مکمل
   کارتها: افقی (آیکون راست + متن چپ)، کم‌ارتفاع
   ========================================================= */
@font-face {
    font-family: 'Estedad';
    src: url('https://zanjan360.ir/wp-content/uploads/2025/12/Estedad-Regular.woff2') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Estedad-black';
    src: url('https://zanjan360.ir/wp-content/uploads/2025/12/Estedad-Black.woff2') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}


:root {
  --font-main: 'Estedad', Tahoma, Arial, sans-serif;

  --z-yellow: #f5c518;
  --z-yellow-dark: #e0b010;
  --z-yellow-deep: #c99a0a;
  --z-yellow-soft: #fef9e7;
  --z-yellow-pale: #fffdf5;
  --z-purple: #4a1d6e;
  --z-purple-light: #6b2d9a;
  --z-purple-soft: #f3eefa;
  --z-ink: #1a0e2e;
  --z-ink-2: #3d2a52;
  --z-muted: #7a6890;

  --bg: #fffdf5;
  --surface: #ffffff;
  --surface-2: #fef9e7;
  --border: #eee4c8;
  --border-strong: #e0d0a0;

  --danger: #b42318;
  --danger-soft: #fdecea;
  --success: #1b7a4a;
  --success-soft: #e6f5ee;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --shadow-s: 0 2px 10px rgba(201, 154, 10, .08);
  --shadow-m: 0 8px 28px rgba(201, 154, 10, .12);
  --shadow-l: 0 20px 56px rgba(201, 154, 10, .16);
  --shadow-glow: 0 0 0 4px rgba(245, 197, 24, .3);

  --max: 1320px;
  --tr: .25s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background:
    radial-gradient(1200px 600px at 85% -5%, rgba(245, 197, 24, .18) 0%, transparent 55%),
    radial-gradient(900px 500px at 5% 10%, rgba(245, 197, 24, .08) 0%, transparent 50%),
    var(--bg);
  color: var(--z-ink);
  line-height: 1.9;
  min-height: 100vh;
  font-size: 17px;
}
a { color: var(--z-purple-light); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--z-purple); }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #fffef8 0%, #fffdf2 100%);
  border-bottom: 3px solid var(--z-yellow);
  box-shadow: 0 4px 24px rgba(201, 154, 10, .08);
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; padding-block: .9rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; text-decoration: none; }
.brand-logo-img { height: 52px; width: auto; border-radius: 12px; object-fit: contain; transition: transform var(--tr); }
.brand:hover .brand-logo-img { transform: scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 1.3rem; color: var(--z-purple); font-weight: 800; }
.brand-text small { font-size: .78rem; font-weight: 500; color: var(--z-muted); }

.search-wrap { flex: 1 1 280px; position: relative; min-width: 220px; }
.search-wrap input {
  width: 100%; padding: .85rem 2.8rem .85rem 1.2rem;
  border: 2px solid var(--border-strong); border-radius: 999px;
  background: #fff; color: var(--z-ink); outline: none;
  transition: border-color var(--tr), box-shadow var(--tr); font-size: 1rem;
}
.search-wrap input:focus { border-color: var(--z-yellow); box-shadow: var(--shadow-glow); }
.search-wrap .search-icon { position: absolute; inset-inline-start: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--z-yellow-deep); font-size: 1.2rem; pointer-events: none; }

.header-meta { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--z-purple); flex-shrink: 0; background: var(--z-yellow-soft); padding: .45rem 1rem; border-radius: 999px; border: 1px solid rgba(245, 197, 24, .3); font-weight: 600; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(27, 122, 74, .15); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ---------- Hero ---------- */
.hero { padding: 3.5rem 0 1.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--z-yellow); color: var(--z-purple);
  padding: .45rem 1.1rem; border-radius: 999px;
  font-size: .88rem; font-weight: 700; margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(245, 197, 24, .3);
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.45; letter-spacing: -.03em; margin-bottom: 1.1rem; color: var(--z-ink); font-weight: 800; }
.hero h1 span { color: var(--z-purple); background: linear-gradient(180deg, transparent 60%, rgba(245, 197, 24, .55) 60%); padding: 0 .15em; }
.hero p { color: var(--z-ink-2); font-size: 1.1rem; max-width: 58ch; margin-bottom: 1.6rem; line-height: 2; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1.8rem; }
.stat strong { display: block; font-size: 1.8rem; color: var(--z-purple); line-height: 1.2; font-weight: 800; }
.stat span { font-size: .9rem; color: var(--z-muted); }

.hero-visual {
  background: linear-gradient(150deg, var(--z-yellow) 0%, #f7d44a 50%, #e8b81a 100%);
  border-radius: var(--radius-l); padding: 1.9rem; color: var(--z-ink);
  box-shadow: var(--shadow-l); position: relative; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .4);
}
.hero-visual::before { content: ""; position: absolute; top: -60px; left: -40px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 70%); }
.hero-visual h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .5rem; position: relative; z-index: 1; color: var(--z-purple); }
.hero-visual h2 svg { width: 22px; height: 22px; }
.hero-quick-list { display: grid; gap: .65rem; position: relative; z-index: 1; }
.hero-quick-list a {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--radius-s); padding: .75rem 1rem;
  color: var(--z-ink); font-size: .95rem; font-weight: 600;
  transition: all var(--tr); backdrop-filter: blur(4px);
}
.hero-quick-list a:hover { background: #fff; transform: translateX(-4px); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); color: var(--z-purple); }
.hero-quick-list a span:last-child { opacity: .7; font-size: .82rem; font-weight: 500; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  position: sticky; top: 78px; z-index: 90;
  background: rgba(255, 253, 245, .95); backdrop-filter: blur(12px);
  padding-block: .9rem; margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--z-yellow);
}
.filter-scroll {
    display: flex;
    gap: .55rem;
    padding-bottom: .3rem;
    flex-wrap: wrap;padding-top: 0.3rem;
}
.filter-scroll::-webkit-scrollbar { height: 6px; }
.filter-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
.filter-btn {
  border: 2px solid var(--border-strong); background: #fff;
  color: var(--z-ink-2); padding: .2rem 1rem;
  border-radius: 999px; font-size: .9rem; font-weight: 600;
  white-space: nowrap; transition: all var(--tr); font-family: inherit;
}
.filter-btn:hover { border-color: var(--z-yellow); color: var(--z-purple); background: var(--z-yellow-soft); }
.filter-btn.active { background: var(--z-yellow); border-color: var(--z-yellow-dark); color: var(--z-purple); box-shadow: 0 6px 18px rgba(245, 197, 24, .35); font-weight: 800; }

/* ---------- Services Grid — دقیقاً ۳ ستون، کارت‌های افقی ---------- */
.services-section { padding-bottom: 3rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { font-size: 1.45rem; letter-spacing: -.02em; color: var(--z-ink); position: relative; padding-inline-start: .9rem; font-weight: 800; }
.section-head h2::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 75%; background: var(--z-yellow); border-radius: 99px; }
.section-head p { font-size: .95rem; color: var(--z-muted); }
.result-count { font-size: .88rem; color: var(--z-purple); background: var(--z-yellow-soft); border: 1px solid rgba(245, 197, 24, .4); padding: .35rem .9rem; border-radius: 999px; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } }

/* کارت افقی: آیکون در سمت راست، متن در کنار */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  align-items: start;
  box-shadow: var(--shadow-s);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--z-yellow);
  opacity: .7;
  transition: opacity var(--tr), width var(--tr);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
  border-color: var(--z-yellow-dark);
}
.card:hover::before { opacity: 1; width: 6px; }
.card.hidden { display: none; }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--z-yellow-soft);
  color: var(--z-yellow-deep);
  flex-shrink: 0;
  transition: transform var(--tr);
  margin: 0;
}
.card:hover .card-icon { transform: scale(1.06); }
.card-icon svg { width: 24px; height: 24px; stroke-width: 1.8; }

.card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card h3 {
  font-size: .98rem;
  font-weight: 800;
  margin: 0 0 .25rem;
  line-height: 1.6;
  color: var(--z-ink);
}
.card p {
  font-size: .94rem;
  color: var(--z-muted);
  line-height: 1.7;
  margin: 0 0 .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .9rem;
  color: var(--z-ink-2);
  margin: 0 0 .45rem;
  padding-top: .4rem;
  border-top: 1px dashed var(--border);
}
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  line-height: 1.6;
}
.card-meta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--z-yellow-deep);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 800;
  color: var(--z-purple);
  margin: 0;
  padding: .15rem 0;
  transition: gap var(--tr);
  align-self: flex-start;
}
.card-link::after { content: "←"; transition: transform var(--tr); }
.card:hover .card-link { gap: .55rem; }
.card:hover .card-link::after { transform: translateX(-4px); }

/* رنگ آیکون بر اساس دسته */
.card[data-category="national"] .card-icon { background: #eef2fc; color: #2b4d8c; }
.card[data-category="zanjan"] .card-icon { background: var(--z-yellow-soft); color: #a8611a; }
.card[data-category="utility"] .card-icon { background: var(--success-soft); color: var(--success); }
.card[data-category="health"] .card-icon { background: var(--danger-soft); color: var(--danger); }
.card[data-category="education"] .card-icon { background: #f3eefa; color: var(--z-purple-light); }
.card[data-category="transport"] .card-icon { background: #e8f5fb; color: #0b6b8f; }
.card[data-category="civil"] .card-icon { background: #f3ecf9; color: #6a3d8f; }
.card[data-category="jobs"] .card-icon { background: #fef7e6; color: #8a6d1b; }
.card[data-category="welfare"] .card-icon { background: #eaf6f1; color: #1b7a4a; }
.card[data-category="emergency"] .card-icon { background: var(--danger-soft); color: var(--danger); }
.card[data-category="business"] .card-icon { background: #e8f0f7; color: #235a7a; }
.card[data-category="post"] .card-icon { background: var(--z-yellow-soft); color: #a8611a; }

/* ---------- Quick Access ---------- */
.quick-access-section {
  background: linear-gradient(135deg, var(--z-yellow) 0%, #ffe066 40%, #f7d44a 100%);
  border-radius: var(--radius-l); padding: 2.2rem 1.8rem;
  margin-bottom: 2.5rem; position: relative; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .5); box-shadow: var(--shadow-l);
}
.quick-access-section::before { content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.quick-access-section::after { content: ""; position: absolute; inset-inline-start: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.quick-access-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.quick-access-head h2 { font-size: 1.4rem; color: var(--z-purple); font-weight: 800; display: flex; align-items: center; gap: .5rem; }
.quick-access-head h2 svg { width: 26px; height: 26px; }
.quick-access-head p { font-size: .9rem; color: var(--z-ink-2); opacity: .8; }

.quick-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1024px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .quick-grid { grid-template-columns: 1fr; } }

.quick-card {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255, 255, 255, .75); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius-m); padding: 1.1rem 1.2rem;
  text-decoration: none; color: var(--z-ink);
  transition: all var(--tr); backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.quick-card:hover { background: #fff; transform: translateY(-4px) rotate(-1deg); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); color: var(--z-purple); }
.quick-card-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--z-purple); color: var(--z-yellow); display: grid; place-items: center; flex-shrink: 0; transition: transform var(--tr); }
.quick-card:hover .quick-card-icon { transform: rotate(6deg) scale(1.06); }
.quick-card-icon svg { width: 28px; height: 28px; stroke-width: 1.8; }
.quick-card-text { display: flex; flex-direction: column; line-height: 1.5; }
.quick-card-text strong { font-size: 1rem; font-weight: 800; }
.quick-card-text span { font-size: .82rem; color: var(--z-ink-2); opacity: .7; }

/* ---------- Departments ---------- */
.departments-section { background: var(--surface); border: 2px solid var(--z-yellow-soft); border-radius: var(--radius-l); padding: 2rem 1.8rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-m); }
.departments-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 3px solid var(--z-yellow); }
.departments-head svg { width: 28px; height: 28px; color: var(--z-yellow-deep); }
.departments-head h2 { font-size: 1.35rem; font-weight: 800; color: var(--z-ink); }
.departments-head p { font-size: .9rem; color: var(--z-muted); margin-right: auto; }

.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1024px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .dept-grid { grid-template-columns: 1fr; } }

.dept-card { background: var(--z-yellow-pale); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 1.1rem 1.2rem; transition: box-shadow var(--tr), border-color var(--tr); }
.dept-card:hover { box-shadow: var(--shadow-s); border-color: var(--z-yellow); }
.dept-card h4 { font-size: 1rem; font-weight: 800; color: var(--z-purple); margin-bottom: .6rem; display: flex; align-items: center; gap: .4rem; }
.dept-card .dept-detail { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--z-ink-2); line-height: 1.8; }
.dept-card .dept-detail span { display: flex; align-items: flex-start; gap: .35rem; }
.dept-card .dept-detail a { color: var(--z-purple-light); font-weight: 600; }
.dept-card .dept-detail a:hover { color: var(--z-purple); }

/* ---------- Emergency ---------- */
.emergency-strip {
  background: linear-gradient(100deg, #6b1210, var(--danger));
  color: #fff; border-radius: var(--radius-m);
  padding: 1.4rem 1.6rem; display: flex; flex-wrap: wrap; align-items: center;
  gap: 1rem 2rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-m);
  position: relative; overflow: hidden;
}
.emergency-strip::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.emergency-strip strong { font-size: 1rem; display: flex; align-items: center; gap: .45rem; position: relative; z-index: 1; }
.emergency-strip .em-list { display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; position: relative; z-index: 1; }
.emergency-strip a { color: #fff; font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; transition: color var(--tr); }
.emergency-strip a:hover { color: var(--z-yellow); }
.em-num { background: rgba(255, 255, 255, .2); border-radius: 6px; padding: .15rem .55rem; font-size: .85rem; font-weight: 800; letter-spacing: .02em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--z-purple); color: rgba(255, 255, 255, .8); padding: 2.5rem 0 2rem; font-size: .9rem; margin-top: 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: start; }
.footer-grid strong { color: #fff; }
.footer-grid a { color: var(--z-yellow); }
.footer-grid a:hover { color: #fff; }
.footer-note { background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .2); border-radius: var(--radius-s); padding: 1rem 1.2rem; margin-top: 1.5rem; font-size: .85rem; line-height: 1.9; }
.back-top { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--z-yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .filter-bar { top: 70px; }
}
@media (max-width: 640px) {
  .header-inner { gap: .6rem; }
  .brand-text small { display: none; }
  .hero { padding-top: 2rem; }
  .hero-stats { gap: 1.2rem; }
  .stat strong { font-size: 1.4rem; }
  .emergency-strip { flex-direction: column; align-items: flex-start; }
  .filter-btn { font-size: .82rem; padding: .45rem .9rem; }
  .header-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .filter-bar, .hero-visual, .back-top, .search-wrap { display: none; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}