/*
Theme Name: Safir 8 — سفیر مشکات هشتم
Theme URI: https://safir8.ir/
Author: مرتضی سبحانی نیا
Description: نسخه ۱.۶؛ قالب سبک سفیر با اصلاح هدر صفحه نخست، بهبود آرشیو وبلاگ و پنل مدیریت پاک‌سازی‌شده.
Version: 1.6.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: safir8
*/

:root { color-scheme: light; }
html, body { margin: 0; min-height: 100%; width: 100%; }
html { padding: 0; }
body.safir8-theme {
  margin: 0;
  padding: 0;
  direction: rtl;
  font-family: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif;
  background: #f4efe5;
}
body.safir8-theme #wpadminbar { direction: ltr; }
.safir8-front-page { margin: 0; padding: 0; width: 100%; }
.safir8-front-page #safir8-app { font-family: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif; }

/* Lightweight native WordPress journal and article templates */
.safir8-blog-preview[hidden]{display:none!important;}
.safir8-blog-preview{background:#fbfaf6;color:#173f3b;padding:clamp(30px,5vw,66px) 20px;border-top:1px solid #e7dfd0}
.safir8-blog-inner{max-width:1180px;margin:0 auto}
.safir8-blog-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:24px}
.safir8-blog-eyebrow{font-size:10px;letter-spacing:2px;color:#8b682b;font-weight:800}
.safir8-blog-heading h2{font-size:clamp(23px,3vw,34px);margin:5px 0 4px;line-height:1.5}
.safir8-blog-heading p{margin:0;color:#657b79;line-height:1.9;font-size:14px}
.safir8-blog-all{color:#77591f;text-decoration:none;border-bottom:1px solid #c9b78f;padding:8px 0;white-space:nowrap;font-size:13px;font-weight:700}
.safir8-blog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.safir8-blog-card{min-width:0;background:#fff;border:1px solid #e9e1d4;border-radius:8px;overflow:hidden;transition:transform .2s,box-shadow .2s}
.safir8-blog-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px #173f3b12}
.safir8-blog-card-link{display:block;color:inherit;text-decoration:none;height:100%}
.safir8-blog-image{aspect-ratio:16/9;overflow:hidden;background:#e5efec}
.safir8-blog-image img{width:100%;height:100%;object-fit:cover;display:block}
.safir8-blog-image-empty{display:grid;place-items:center;background:linear-gradient(135deg,#e6f0ec,#f5f4e9);color:#175b59;font-size:44px;font-weight:900}
.safir8-blog-card-body{padding:16px}
.safir8-blog-card time{font-size:11px;color:#72817e}
.safir8-blog-card h3{font-size:17px;line-height:1.8;margin:7px 0;color:#173f3b}
.safir8-blog-card p{font-size:13px;line-height:2;color:#65716e;margin:0 0 13px}
.safir8-blog-read{font-size:12px;font-weight:800;color:#8b682b}
.safir8-post-shell{max-width:900px;margin:40px auto;padding:0 20px 60px;color:#173f3b;line-height:2}
.safir8-post-shell .safir8-post-kicker{color:#287c91;font-size:11px;font-weight:800;letter-spacing:1px}
.safir8-post-shell h1{font-size:clamp(28px,5vw,44px);line-height:1.7;margin:8px 0}
.safir8-post-meta{color:#74817e;font-size:12px;margin-bottom:24px}
.safir8-post-featured img{width:100%;height:auto;border-radius:12px}
.safir8-post-content{font-size:17px;line-height:2.2;overflow-wrap:anywhere}
.safir8-post-content img{max-width:100%;height:auto}
.safir8-post-content a{color:#176b77;text-underline-offset:3px}
.safir8-post-nav{display:flex;justify-content:space-between;gap:12px;margin-top:30px;border-top:1px solid #dce8e5;padding-top:18px}
.safir8-post-nav a{color:#175b59;text-decoration:none}
.safir8-archive-shell{max-width:1180px;margin:35px auto 60px;padding:0 20px;color:#173f3b}
.safir8-archive-shell h1{font-size:clamp(28px,4vw,42px)}
.safir8-blog-home-heading{padding:clamp(20px,4vw,38px) 0 22px;margin-bottom:24px;border-bottom:1px solid #e8dfd0}
.safir8-blog-home-heading h1{margin:7px 0 5px;line-height:1.55;color:#173f3b}
.safir8-blog-home-heading p{margin:0;color:#657b79;font-size:14px;line-height:2}
.safir8-blog-home .safir8-blog-grid{margin-top:8px}

.safir8-archive-pagination{margin-top:24px}
.safir8-archive-pagination .page-numbers{display:inline-block;padding:8px 12px;margin:3px;border:1px solid #d7e3e0;border-radius:6px;text-decoration:none;color:#175b59}
@media(max-width:700px){
.safir8-blog-heading{align-items:flex-start;flex-direction:column}
.safir8-blog-grid{grid-template-columns:1fr;gap:12px}
.safir8-blog-card{display:block}
.safir8-blog-card-link{display:grid;grid-template-columns:minmax(105px,36%) minmax(0,1fr);align-items:stretch;min-height:150px}
.safir8-blog-image{height:100%;min-height:150px;aspect-ratio:auto}
.safir8-blog-image img{height:100%;min-height:150px;object-fit:cover}
.safir8-blog-card-body{min-width:0;padding:12px;overflow-wrap:anywhere}
.safir8-blog-card h3{font-size:15px;line-height:1.7;margin:5px 0}
.safir8-blog-card p{font-size:12px;line-height:1.8;display:block;white-space:normal;overflow-wrap:anywhere;margin:0 0 9px}
.safir8-blog-read{display:inline-block}
.safir8-post-shell{margin-top:24px}
.safir8-post-content{font-size:15px}
.safir8-site-header-inner{align-items:flex-start;flex-direction:column;gap:12px}
.safir8-site-nav{width:100%;display:flex;flex-wrap:wrap;gap:8px 16px}
.safir8-site-nav a{font-size:12px}
}

#safir8-app .s8-section-image{display:block;max-width:100%;height:auto;max-height:640px;object-fit:contain;border-radius:8px;margin:12px 0;border:1px solid #ffffff38;background:#fff}

/* Compact, reusable header for native WordPress journal pages */
.safir8-site-header{background:#fbfaf6;border-bottom:1px solid #e8dfd0;box-shadow:0 5px 18px rgba(65,49,23,.035);}
.safir8-site-header-inner{max-width:1180px;margin:0 auto;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:24px;}
.safir8-site-brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#173f3b;min-width:0;}
.safir8-site-brand-mark{display:grid;place-items:center;width:42px;height:42px;border:1px solid #c7a96c;border-radius:50%;color:#8b682b;font-size:24px;font-weight:800;flex:none;}
.safir8-site-brand-copy{display:flex;flex-direction:column;gap:2px;}
.safir8-site-brand-copy strong{font-size:16px;line-height:1.6;font-weight:800;}
.safir8-site-brand-copy small{font-size:11px;color:#7b7468;}
.safir8-site-nav{display:flex;align-items:center;gap:clamp(14px,2.5vw,30px);}
.safir8-site-nav a{color:#3c514d;text-decoration:none;font-size:13px;line-height:1.8;white-space:nowrap;padding:5px 0;border-bottom:1px solid transparent;}
.safir8-site-nav a:hover,.safir8-site-nav a[aria-current="page"]{color:#8b682b;border-bottom-color:#c7a96c;}
.safir8-admin .s8-color-options{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 4px;}
.safir8-admin .s8-color-choice{display:inline-flex;align-items:center;gap:7px;border:1px solid #d6d9d8;border-radius:7px;padding:8px 11px;background:#fff;color:#344b48;cursor:pointer;font-size:13px;}
.safir8-admin .s8-color-choice:has(input:checked){border-color:#8b682b;box-shadow:0 0 0 1px #8b682b;background:#fcf8ef;}
.safir8-admin .s8-color-choice input{margin:0;accent-color:#8b682b;}
.safir8-admin .s8-color-dot{width:13px;height:13px;border-radius:50%;border:1px solid #0002;display:inline-block;}
