/*
Theme Name: MagicSun Foundation
Text Domain: magicsun-foundation
Description: قالب مستقل و واکنش‌گرای اختصاصی بنیاد مجیکسان، بر پایه دفترچه راهبردی مصوب
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/

html { scroll-behavior: smooth; }

/* MagicSun visual system — draft-wide, non-destructive visual layer */
:root {
  --ms-brand-navy: #091329;
  --ms-brand-ink: #151722;
  --ms-brand-gold: #ffc000;
  --ms-brand-green: #009e79;
  --ms-brand-blue: #0789d1;
  --ms-brand-text: #172238;
  --ms-brand-muted: #68758a;
  --ms-brand-line: #dfe6ef;
  --ms-brand-surface: #f5f7fb;
  --ms-brand-radius: 14px;
}
body, .msf-site {
  color: var(--ms-brand-text);
  background: #f7f9fc;
  font-family: IRANSans, IRANSansWeb, Vazirmatn, Tahoma, sans-serif;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5,h6 { font-family: inherit; letter-spacing: -0.025em; }
a { transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
button, input, select, textarea { font: inherit; }
:where(.msf-main,.msf-interior,.msf-site) h1 { font-weight: 900; line-height: 1.55; }
:where(.msf-main,.msf-interior,.msf-site) h2 { font-weight: 850; line-height: 1.65; }
:where(.msf-main,.msf-interior,.msf-site) p { line-height: 1.95; }
.msf-wrap { width: min(1240px, calc(100% - 36px)); }
.msf-topbar { background: linear-gradient(105deg,var(--ms-brand-navy),var(--ms-brand-ink)) !important; border-bottom: 2px solid var(--ms-brand-gold) !important; }
.msf-header { background: rgba(255,255,255,.97) !important; border-bottom: 1px solid var(--ms-brand-line) !important; box-shadow: 0 5px 22px rgba(9,19,41,.06) !important; }
.msf-brand strong { color: var(--ms-brand-navy); font-weight: 900; }
.msf-menu>li>a { border-radius: 999px; font-weight: 750; }
.msf-menu>li:hover>a,.msf-menu>li:focus-within>a,.msf-menu>li.current-menu-item>a { background: var(--ms-brand-navy) !important; color:#fff !important; border-color:var(--ms-brand-navy) !important; }
.msf-menu .sub-menu { border:1px solid var(--ms-brand-line) !important; border-radius:12px !important; box-shadow:0 18px 44px rgba(9,19,41,.13) !important; }
.msf-hero { overflow:hidden; border-radius:0 0 22px 22px; background:var(--ms-brand-navy) !important; }
.msf-slide { background-image:linear-gradient(105deg,rgba(9,19,41,.92),rgba(21,23,34,.78) 62%,rgba(9,19,41,.35)),var(--msf-slide-image) !important; background-position:center !important; background-size:cover !important; }
.msf-slide.is-active { min-height:clamp(380px,43vw,560px); }
.msf-slide .msf-hero-content { padding-block:clamp(36px,6vw,76px) !important; }
.msf-hero h1 { color:#fff !important; font-size:clamp(20px,4vw,30px) !important; font-weight:900 !important; line-height:1.45 !important; }
.msf-hero p { color:#e0e7f1 !important; font-size:clamp(15px,1.4vw,18px); }
.msf-eyebrow { color:#d99e00 !important; font-weight:850 !important; }
.msf-button,.msf-more-button { min-height:42px; border-radius:10px !important; font-weight:850 !important; }
.msf-button-gold { background:var(--ms-brand-gold) !important; color:var(--ms-brand-navy) !important; border:1px solid var(--ms-brand-gold) !important; }
.msf-button-ghost { border:1px solid rgba(255,255,255,.38) !important; background:rgba(255,255,255,.08) !important; color:#fff !important; }
.msf-section { padding-block:clamp(38px,5vw,68px) !important; }
.msf-section-heading { margin-bottom:26px !important; }
.msf-section-heading h2 { color:var(--ms-brand-navy) !important; font-size:clamp(24px,3vw,34px) !important; }
.msf-section-heading p { color:var(--ms-brand-muted) !important; }
.msf-mission,.msf-featured,.msf-latest,.msf-gallery { background:var(--ms-brand-surface) !important; border-color:var(--ms-brand-line) !important; }
.msf-pillar-grid { gap:14px !important; }
.msf-pillar,.msf-article-card,.msf-gallery-card,.msf-archive-card,.msf-page-content,.msf-article-content,.msf-sidebar-box {
  border:1px solid var(--ms-brand-line) !important;
  border-radius:var(--ms-brand-radius) !important;
  background:#fff !important;
  box-shadow:0 6px 22px rgba(9,19,41,.045) !important;
  overflow:hidden;
}
.msf-pillar { padding:22px 18px !important; text-align:right !important; align-items:flex-start !important; }
.msf-pillar:nth-child(n),.msf-didban-card:nth-child(n) { background:#fff !important; border-color:var(--ms-brand-line) !important; color:var(--ms-brand-text) !important; }
.msf-pillar-icon { background:#fff7dc !important; color:#a97700 !important; border:1px solid #f3df9d !important; border-radius:12px !important; }
.msf-pillar h3,.msf-didban-card strong { color:var(--ms-brand-navy) !important; background:#f6f8fb !important; border:1px solid var(--ms-brand-line) !important; border-radius:9px !important; }
.msf-pillar p,.msf-card-body p,.msf-gallery-card p,.msf-text-link { color:var(--ms-brand-muted) !important; }
.msf-pillar:hover,.msf-article-card:hover,.msf-gallery-card:hover,.msf-archive-card:hover { transform:translateY(-3px); border-color:#e8bf45 !important; box-shadow:0 15px 34px rgba(9,19,41,.10) !important; }
.msf-article-card,.msf-gallery-card { transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.msf-card-image img,.msf-gallery-card img { width:100%; aspect-ratio:16/10; object-fit:cover !important; }
.msf-card-body { padding:20px !important; }
.msf-card-body h3,.msf-archive-card h2 { font-size:18px !important; line-height:1.75 !important; font-weight:850 !important; }
.msf-card-body h3 a,.msf-archive-card h2 a { color:var(--ms-brand-navy) !important; }
.msf-card-meta,.msf-article-meta { color:var(--ms-brand-muted) !important; }
.msf-didban { background:linear-gradient(125deg,var(--ms-brand-navy),var(--ms-brand-ink)) !important; border-radius:22px; margin-block:22px; }
.msf-didban h2,.msf-didban .msf-eyebrow { color:#fff !important; }
.msf-didban p { color:#dce5f0 !important; }
.msf-didban-card,.msf-didban-card:nth-child(n) { background:rgba(255,255,255,.07) !important; border:1px solid rgba(255,255,255,.18) !important; color:#fff !important; border-radius:12px !important; }
.msf-didban-card strong { background:rgba(255,255,255,.08) !important; color:#fff !important; border-color:rgba(255,255,255,.2) !important; }
.msf-didban-card small { color:#dce5f0 !important; }
.msf-latest-item { border:1px solid var(--ms-brand-line) !important; border-radius:12px !important; background:#fff !important; padding:16px !important; }
.msf-latest-item h3,.msf-latest-item h3 a { color:var(--ms-brand-navy) !important; font-weight:800 !important; }
.msf-latest-item .msf-text-link { color:#087a63 !important; }
.msf-cta { background:linear-gradient(120deg,var(--ms-brand-navy),#172b4d) !important; border-radius:20px; overflow:hidden; }
.msf-cta h2,.msf-cta p { color:#fff !important; }
.msf-footer { background:linear-gradient(120deg,#07101f,#111827) !important; border-top:3px solid var(--ms-brand-gold) !important; }
.msf-footer-grid>div { border:1px solid rgba(255,255,255,.14) !important; border-radius:14px !important; background:rgba(255,255,255,.045) !important; }
.msf-footer a:hover { color:var(--ms-brand-gold) !important; }
.msf-interior { background:transparent !important; }
.msf-page-content,.msf-article-content { padding:clamp(22px,4vw,46px) !important; }
.msf-page-header h1,.msf-article-header h1,.msf-archive-header h1 { color:var(--ms-brand-navy) !important; font-weight:900 !important; }
.msf-prose { color:#26364d !important; font-size:16px !important; line-height:2.15 !important; }
.msf-prose h2,.msf-prose h3 { color:var(--ms-brand-navy) !important; font-weight:850 !important; }
.msf-prose blockquote,.msf-prose blockquote p { border-inline-start:4px solid var(--ms-brand-gold); background:#fff8df; padding:14px 18px; border-radius:0 10px 10px 0; }
.msf-prose table { width:100%; border-collapse:separate; border-spacing:0; border-radius:12px; overflow:hidden; }
.msf-prose th { background:var(--ms-brand-navy); color:#fff; }
.msf-prose th,.msf-prose td { padding:11px 13px; border:1px solid var(--ms-brand-line); }
.msf-sidebar-link { border-radius:9px !important; background:#f7f9fc !important; border-color:var(--ms-brand-line) !important; }
.msf-pagination a,.msf-pagination .current { border-radius:9px !important; }
:where(.msf-site,.msf-main,.msf-interior) a:focus-visible,
:where(.msf-site,.msf-main,.msf-interior) button:focus-visible,
:where(.msf-site,.msf-main,.msf-interior) input:focus-visible { outline:3px solid var(--ms-brand-gold) !important; outline-offset:3px; }
@media(max-width:760px) {
  .msf-wrap { width:calc(100% - 28px) !important; }
  .msf-hero { border-radius:0 0 16px 16px; }
  .msf-slide.is-active { min-height:360px !important; }
  .msf-pillar-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .msf-pillar { padding:17px 14px !important; }
  .msf-section { padding-block:36px !important; }
  .msf-page-content,.msf-article-content { padding:20px 16px !important; }
}
@media(max-width:480px) {
  .msf-pillar-grid,.msf-article-grid,.msf-gallery-grid,.msf-archive-grid { grid-template-columns:minmax(0,1fr) !important; }
  .msf-hero h1 { font-size:29px !important; }
  .msf-slide .msf-hero-content { padding-block:30px 68px !important; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none !important; scroll-behavior:auto !important; }
}
/* Light footer + CTA banner for the redesigned front page only (page 29989) */
body.page-id-29989 .msf-cta { background:linear-gradient(135deg,#e0f2fe,#fef3c7) !important; border:1px solid #cbd5e1; }
body.page-id-29989 .msf-cta h2,body.page-id-29989 .msf-cta p { color:#0f172a !important; }
body.page-id-29989 .msf-cta .msf-eyebrow { color:#0e7490 !important; }
body.page-id-29989 .msf-footer { background:#ffffff !important; border-top:3px solid #fbbf24 !important; color:#334155 !important; }
body.page-id-29989 .msf-footer-grid>div { background:#f8fafc !important; border:1px solid #e2e8f0 !important; }
body.page-id-29989 .msf-footer-brand strong,body.page-id-29989 .msf-footer h2 { color:#0f172a !important; }
body.page-id-29989 .msf-footer-brand small,body.page-id-29989 .msf-footer-brand p { color:#475569 !important; }
body.page-id-29989 .msf-footer-grid>div:not(:first-child) a { color:#0f172a !important; background:#ffffff !important; border:1px solid #cbd5e1 !important; }
body.page-id-29989 .msf-footer a:hover,body.page-id-29989 .msf-footer-grid>div:not(:first-child) a:hover { color:#b45309 !important; background:#e0f2fe !important; }
body.page-id-29989 .msf-footer-bottom { color:#475569 !important; border-top:1px solid #e2e8f0 !important; }
/* Sitewide light minimal design system (extends the front-page design to every page) */
body.msf-site { background:#f4f7fb !important; }
body.msf-site .msf-cta { background:linear-gradient(135deg,#e0f2fe,#fef3c7) !important; border:1px solid #cbd5e1; }
body.msf-site .msf-cta h2,body.msf-site .msf-cta p { color:#0f172a !important; }
body.msf-site .msf-cta .msf-eyebrow { color:#0e7490 !important; }
body.msf-site .msf-footer { background:#ffffff !important; border-top:3px solid #fbbf24 !important; color:#334155 !important; }
body.msf-site .msf-footer-grid>div { background:#f8fafc !important; border:1px solid #e2e8f0 !important; }
body.msf-site .msf-footer-brand strong,body.msf-site .msf-footer h2 { color:#0f172a !important; }
body.msf-site .msf-footer-brand small,body.msf-site .msf-footer-brand p { color:#475569 !important; }
body.msf-site .msf-footer-grid>div:not(:first-child) a { color:#0f172a !important; background:#ffffff !important; border:1px solid #cbd5e1 !important; }
body.msf-site .msf-footer a:hover,body.msf-site .msf-footer-grid>div:not(:first-child) a:hover { color:#b45309 !important; background:#e0f2fe !important; }
body.msf-site .msf-footer-bottom { color:#475569 !important; border-top:1px solid #e2e8f0 !important; }
body.msf-site .msf-pillar,body.msf-site .msf-article-card,body.msf-site .msf-gallery-card,body.msf-site .msf-archive-card,body.msf-site .msf-page-content,body.msf-site .msf-article-content,body.msf-site .msf-sidebar-box { border-radius:22px !important; border:1px solid #e2e8f0 !important; box-shadow:0 20px 50px rgba(15,23,42,.09) !important; transition:transform .35s ease,box-shadow .35s ease; }
body.msf-site .msf-pillar:hover,body.msf-site .msf-article-card:hover,body.msf-site .msf-gallery-card:hover,body.msf-site .msf-archive-card:hover { transform:translateY(-6px); box-shadow:0 30px 70px rgba(14,116,144,.2) !important; }
body.msf-site .msf-prose h1,body.msf-site .msf-prose h2,body.msf-site .msf-prose h3,body.msf-site .msf-article-header h1 { color:#0f172a; }
body.msf-site .msf-prose p,body.msf-site .msf-prose li { color:#334155; }
@media(prefers-reduced-motion:reduce) { body.msf-site .msf-pillar:hover,body.msf-site .msf-article-card:hover,body.msf-site .msf-gallery-card:hover,body.msf-site .msf-archive-card:hover { transform:none; } }
