/*
Theme Name: Hasin Healthcare (جمعية حصين الصحية)
Author: جمعية حصين الصحية
Description: قالب ووردبريس عربي (من اليمين لليسار) لجمعية حصين الصحية بهوية الشعار: أزرق وأخضر وأحمر. يتضمن صفحة رئيسية، المشاريع، الشركاء، الأخبار، نموذج تواصل، وإعدادات كاملة من لوحة التخصيص.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hasin
*/

:root{
  --blue:#3687C6;--blue-d:#1F5F96;--navy:#12385A;
  --green:#1DA64F;--green-d:#11833B;--red:#E11F48;
  --soft:#EEF5FB;--soft2:#DCEAF5;--line:#D5E3EF;
  --muted:#475B6B;--ink:#12385A;--on-navy:#CFE0EE;--radius:12px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:'Tajawal',system-ui,sans-serif;color:var(--ink);background:#fff;line-height:1.7;font-size:17px}
img{max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
a:hover{opacity:.88}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
h1,h2,h3{line-height:1.3}
.container{max-width:1200px;margin:0 auto;padding:0 24px}
.skip{position:absolute;top:-80px;right:16px;background:#fff;padding:10px 16px;z-index:100;border:2px solid var(--blue);border-radius:8px}
.skip:focus{top:8px}

/* الشريط العلوي */
.topbar{background:var(--navy);color:#fff;font-size:15px}
.topbar-in{display:flex;flex-wrap:wrap;gap:8px 32px;justify-content:space-between;padding-top:10px;padding-bottom:10px}
.topbar-in div{display:flex;flex-wrap:wrap;gap:8px 24px}

/* الترويسة */
.site-header{background:#fff;position:sticky;top:0;z-index:50;box-shadow:0 1px 0 var(--line)}
.header-in{display:flex;align-items:center;gap:12px 28px;justify-content:space-between;padding-top:12px;padding-bottom:12px}
.brand{display:flex;align-items:center;gap:14px}
.brand img{height:60px;width:auto;display:block}
.brand-text{display:flex;flex-direction:column;line-height:1.25}
.brand-text strong{font-size:23px;font-weight:800}
.brand-text small{font-size:12px;letter-spacing:1.4px;color:var(--muted)}
.nav{display:flex;gap:4px 22px;font-weight:500;font-size:17px}
.nav a{padding:8px 2px;border-bottom:3px solid transparent}
.nav a:hover,.nav a[aria-current="page"]{border-bottom-color:var(--blue)}
.menu-toggle{display:none;align-items:center;justify-content:center;width:46px;height:46px;border:2px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);cursor:pointer}
.brandbar{display:flex;height:5px}
.brandbar i{flex:1}
.brandbar i:nth-child(1){background:var(--blue)}
.brandbar i:nth-child(2){background:var(--green)}
.brandbar i:nth-child(3){background:var(--red)}

/* الأزرار */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 28px;border-radius:8px;font-weight:700;font-size:17px;border:2px solid transparent;cursor:pointer;font-family:inherit;line-height:1.2}
.btn-red{background:var(--red);color:#fff}
.btn-outline{border-color:var(--blue-d);color:var(--blue-d);background:transparent}
.btn-block{width:100%}
.link{font-weight:700;color:var(--blue-d);display:inline-flex;align-items:center;min-height:44px}

/* الأقسام */
.section{padding:72px 0}
.section-soft{background:var(--soft)}
.section-navy{background:var(--navy);color:#fff}
.section h2{font-size:36px;margin:0 0 8px;font-weight:800}
.lead{color:var(--muted);font-size:18px;margin:0 0 32px}
.section-navy .lead{color:var(--on-navy)}
.head-row{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:flex-end;margin-bottom:32px}
.head-row .lead{margin:0}
.grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.grid-6{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}

/* الواجهة الرئيسية */
.hero{background:var(--soft)}
.hero-in{display:flex;flex-wrap:wrap;gap:40px;align-items:center;padding-top:64px;padding-bottom:64px}
.hero-text{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;gap:20px;align-items:flex-start}
.hero-text .eyebrow{font-weight:700;color:var(--green-d);font-size:16px}
.hero-text h1{margin:0;font-size:clamp(34px,5vw,52px);font-weight:800}
.hero-text p{margin:0;font-size:20px;line-height:1.8;color:var(--muted)}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.hero-logo{flex:1 1 380px;min-width:0;display:flex;justify-content:center}
.hero-logo div{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;max-width:460px;width:100%}
.hero-logo img{display:block;width:100%}

/* البطاقات */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:28px;display:flex;flex-direction:column;gap:12px}
.card h3{margin:0;font-size:22px;font-weight:700}
.card p{margin:0;color:var(--muted);font-size:16px}
.card-top-red{border-top:5px solid var(--red)}
.card-top-blue{border-top:5px solid var(--blue)}
.card-top-green{border-top:5px solid var(--green)}
.card svg{width:36px;height:36px}
a.card:hover{box-shadow:0 6px 20px rgba(18,56,90,.1);opacity:1}
.project{padding:0;overflow:hidden}
.project .body{padding:24px;display:flex;flex-direction:column;gap:14px}
.ph-img{background:var(--soft2);color:#3D5568;display:flex;align-items:center;justify-content:center;text-align:center;font-size:16px;padding:12px}
.project .ph-img{height:180px}
.bar{height:8px;border-radius:4px;background:var(--soft2)}
.bar span{display:block;height:8px;border-radius:4px;background:var(--green)}
.meta{display:flex;justify-content:space-between;font-size:15px;color:var(--muted)}

/* الأرقام */
.stat{border:1px solid #2F5F86;border-radius:var(--radius);padding:24px;display:flex;flex-direction:column;gap:6px}
.stat b{font-size:44px;font-weight:800;line-height:1.2}
.stat span{font-size:18px;color:var(--on-navy)}
.stat.s1,.stat.s4{border-top:5px solid var(--blue)}
.stat.s2{border-top:5px solid var(--green)}
.stat.s3{border-top:5px solid var(--red)}

/* الحسابات البنكية */
.bank{background:#fff;border:2px solid var(--blue);border-radius:var(--radius);padding:28px;display:grid;gap:12px}
.bank dl{display:grid;grid-template-columns:auto 1fr;gap:10px 24px;margin:0}
.bank dt{font-weight:700;color:var(--muted)}
.bank dd{margin:0;font-weight:700;word-break:break-all}

/* الأخبار */
.news{display:flex;flex-direction:column;gap:10px}
.news .ph-img{height:200px;border-radius:var(--radius)}
.news small{color:var(--muted);font-size:15px}
.news h3{margin:0;font-size:21px;font-weight:700}

/* الشركاء */
.partner{height:96px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);display:flex;align-items:center;justify-content:center;color:#3D5568;font-size:15px;text-align:center;padding:8px}

/* الصفحات الداخلية */
.page-hero{background:var(--soft);padding:48px 0;border-bottom:1px solid var(--line)}
.page-hero h1{margin:0 0 6px;font-size:clamp(30px,4.5vw,44px);font-weight:800}
.page-hero p{margin:0;color:var(--muted);font-size:18px}
.crumbs{font-size:15px;color:var(--muted);margin-bottom:10px}
.prose{max-width:820px}
.prose h2{font-size:30px;margin:40px 0 10px}
.prose h2:first-child{margin-top:0}
.prose p{color:#2B4357}
.two{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.person{text-align:center;align-items:center}
.person .ph-img{width:110px;height:110px;border-radius:50%}

/* النموذج */
.form-wrap{display:flex;flex-wrap:wrap;gap:32px;align-items:flex-start}
.form{flex:2 1 420px;min-width:0;display:grid;gap:18px}
.info{flex:1 1 280px;min-width:0;display:grid;gap:16px}
.field{display:grid;gap:6px}
.field label{font-weight:700}
.field input,.field select,.field textarea{font-family:inherit;font-size:17px;padding:12px 14px;border:2px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);width:100%}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue);outline:none}
.field textarea{min-height:150px;resize:vertical}
.hp{position:absolute;left:-9999px;height:0;overflow:hidden}
.note{font-size:15px;color:var(--muted)}

/* التذييل */
.footer{background:var(--navy);color:var(--on-navy)}
.footer-in{display:flex;flex-wrap:wrap;gap:32px;padding-top:48px;padding-bottom:32px}
.footer .col{flex:1 1 200px;min-width:0;display:flex;flex-direction:column;gap:8px}
.footer .col.wide{flex:2 1 320px}
.footer h4{margin:0 0 4px;font-size:18px;color:#fff}
.footer a{min-height:32px;display:flex;align-items:center}
.footer .logo-chip{background:#fff;border-radius:12px;padding:8px;display:flex;width:max-content}
.footer .logo-chip img{height:56px;width:auto;display:block}
.footer .brand-line{display:flex;align-items:center;gap:14px;color:#fff;font-size:24px;font-weight:800}
.copy{border-top:1px solid #2F5F86;padding:20px 0;font-size:15px}

/* الجوال */
@media (max-width:960px){
  .menu-toggle{display:inline-flex;margin-inline-start:auto}
  .nav{display:none;order:5;width:100%;flex-direction:column;padding:8px 0 12px;border-top:1px solid var(--line)}
  .nav.open{display:flex}
  .nav a{padding:12px 4px}
  .header-in{flex-wrap:wrap}
  .section{padding:56px 0}
  .section h2{font-size:30px}
}
@media (max-width:520px){
  .brand-text strong{font-size:19px}
  .brand img{height:50px}
  .header-in>.btn{padding:10px 18px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* ===== إضافات القالب ===== */
.admin-bar .site-header{top:32px}
@media (max-width:782px){.admin-bar .site-header{top:46px}}
.nav-list{display:flex;flex-wrap:wrap;gap:4px 22px;list-style:none;margin:0;padding:0}
.nav-list a{display:block}
.nav-list .current-menu-item>a,.nav-list .current_page_item>a,.nav-list .current-menu-ancestor>a{border-bottom-color:var(--blue)}
@media (max-width:960px){.nav-list{flex-direction:column;width:100%;gap:0}}
.project .thumb{display:block}
.project .thumb img{width:100%;height:180px;object-fit:cover;display:block}
.project h3 a,.news h3 a{color:inherit}
.news img{width:100%;height:200px;object-fit:cover;border-radius:var(--radius);display:block}
.news .excerpt{margin:0;color:var(--muted)}
.partner img{max-height:70px;width:auto;object-fit:contain}
.entry img,.lead-img{max-width:100%;height:auto;border-radius:var(--radius)}
.entry ul,.entry ol{padding-inline-start:24px}
.entry a{color:var(--blue-d);text-decoration:underline}
.entry table{border-collapse:collapse;width:100%}
.entry th,.entry td{border:1px solid var(--line);padding:8px 12px;text-align:start}
.alignwide{max-width:1200px}
.notice{padding:14px 16px;border-radius:8px;font-weight:700}
.notice-ok{background:#E6F5EC;color:#0B5F2B;border:1px solid #1DA64F}
.notice-bad{background:#FDECEF;color:#9A1230;border:1px solid #E11F48}
.pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:32px}
.pagination .page-numbers{padding:8px 14px;border:1px solid var(--line);border-radius:8px;min-height:44px;display:inline-flex;align-items:center}
.pagination .current{background:var(--navy);color:#fff;border-color:var(--navy)}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}

/* المشاريع المنجزة */
.section-done{background:linear-gradient(180deg,#F1F9F4 0%,#fff 100%)}
.project.done{border-top:5px solid var(--green)}
.project .thumb{position:relative}
.badge-done{position:absolute;top:14px;right:14px;display:inline-flex;align-items:center;gap:6px;background:var(--green-d);color:#fff;font-weight:700;font-size:15px;line-height:1;padding:9px 16px 9px 12px;border-radius:999px;box-shadow:0 4px 14px rgba(0,0,0,.22)}
.badge-done svg{width:18px;height:18px}
.done-line{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--green-d);font-weight:700;font-size:16px}
.done-line span{display:inline-flex;align-items:center;gap:6px}
.done-line svg{width:22px;height:22px}
.done-line .cost{color:var(--muted);font-weight:400;font-size:15px}
.project.done .thumb img{filter:saturate(1.05)}
.done-note{margin-top:24px}
.done-note p .btn{margin-inline-end:8px}

/* بطاقات المشاريع: عرض الصورة/البوستر كاملاً بنسبة مربعة بدل قصّها */
.project .thumb img{height:auto;aspect-ratio:1/1;object-fit:cover}
.project .ph-img{height:auto;aspect-ratio:1/1}
.project .btn-block{margin-top:6px}
.project:hover{transform:translateY(-4px);box-shadow:0 14px 34px rgba(18,56,90,.16)}
.project{transition:transform .2s ease,box-shadow .2s ease}

/* ترويسة ثابتة (يفعّلها main.js عند التمرير) */
.site-header.is-fixed{position:fixed;left:0;right:0;width:100%;z-index:1000;box-shadow:0 4px 18px rgba(18,56,90,.14)}
@media (max-width:960px){.site-header.is-fixed .nav.open{max-height:calc(100vh - 90px);overflow-y:auto}}

/* ===== الهوية الزرقاء الغالبة (v1.3.0) ===== */
:root{--navy2:#0E2F4B;--deep:#0A2438;--sky:#9CCBF0}
body{background:var(--navy);color:#fff}
:focus-visible{outline-color:#8CC8F5}
.topbar{background:var(--deep)}
.site-header{color:var(--ink)}
.hero{background:linear-gradient(135deg,#1F5F96 0%,#12385A 70%);color:#fff}
.hero-text .eyebrow{color:#7FE0A3}
.hero-text p{color:var(--on-navy)}
.hero .btn-outline{border-color:#fff;color:#fff}
.section+.section,.hero+.section{border-top:1px solid rgba(255,255,255,.08)}
.section-soft{background:var(--navy2)}
.section-navy{background:var(--navy2);color:#fff}
.section-done{background:var(--navy)}
.lead{color:var(--on-navy)}
.link{color:var(--sky)}
.card,.bank{color:var(--ink)}
.card .link,.bank .link,.entry .link{color:var(--blue-d)}
.card .btn-outline,.entry .btn-outline,.bank .btn-outline{border-color:var(--blue-d);color:var(--blue-d)}
.news small,.news .excerpt{color:var(--on-navy)}
.partner{color:var(--ink)}
.page-hero{background:var(--navy2);color:#fff;border-bottom:1px solid rgba(255,255,255,.1)}
.page-hero p,.crumbs{color:var(--on-navy)}
.prose.entry,.form-wrap{background:#fff;color:var(--ink);border-radius:16px;padding:36px 32px}
.form-wrap{max-width:1200px}
.entry h2{border-inline-start:5px solid var(--green);padding-inline-start:12px}
.footer{background:var(--deep)}
.stat{border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.05)}
@media (max-width:640px){.prose.entry,.form-wrap{padding:24px 18px;border-radius:12px}}

/* الحوكمة والإفصاح: كتل الملفات كبطاقات */
.entry .wp-block-file{display:flex;align-items:center;justify-content:space-between;gap:12px 16px;flex-wrap:wrap;background:var(--soft);border:1px solid var(--line);border-inline-start:5px solid var(--blue);border-radius:12px;padding:16px 20px;margin:12px 0}
.entry .wp-block-file a:not(.wp-block-file__button){font-weight:700;color:var(--ink);text-decoration:none}
.entry .wp-block-file .wp-block-file__button{background:var(--blue-d);color:#fff;border-radius:8px;padding:8px 20px;font-weight:700;text-decoration:none;font-size:16px}
.entry .wp-block-file embed,.entry .wp-block-file object{width:100%}
