/* ===== هيكل الموقع المشترك: الشريط العلوي، رأس الصفحات، التذييل ===== */
:root{
  --aj-mud:#2A1B0E;
  --aj-mud2:#3B2716;
  --aj-gold:#CDA868;
  --aj-gold-ink:#8A6630;
  --aj-plaster:#FAF7F0;
  --aj-clay:#ECE2CF;
  --aj-ivory:#F8F1E2;
  --aj-line:#DCCDB1;
  --aj-kufi:'Noto Kufi Arabic',sans-serif;
  --aj-naskh:'Noto Naskh Arabic',serif;
  --aj-ruqaa:'Aref Ruqaa','Noto Naskh Arabic',serif;
  --aj-wrap:1160px;
  /* شرفات نجدية: مثلثات على رأس الجدار */
  --aj-cren-plaster:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='13'%3E%3Cpath d='M2 13L13 1.5L24 13Z' fill='%23FAF7F0'/%3E%3C/svg%3E");
  --aj-cren-mud:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='13'%3E%3Cpath d='M2 13L13 1.5L24 13Z' fill='%232A1B0E'/%3E%3C/svg%3E");
}
html,body{background:var(--aj-plaster)}
body{background:var(--aj-plaster)}

/* ---------- الشريط العلوي ---------- */
.ajbar{position:relative;z-index:60;background:var(--aj-mud);color:var(--aj-ivory);border-bottom:1px solid rgba(205,168,104,.28)}
.ajbar-in{max-width:var(--aj-wrap);margin:0 auto;padding:0 22px;height:62px;display:flex;align-items:center;gap:18px}
.ajbrand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--aj-ivory);flex:none}
.ajbrand img{height:38px;width:auto;display:block}
.ajbrand span{font-family:var(--aj-ruqaa);font-weight:700;font-size:25px;line-height:1;padding-top:4px;letter-spacing:0}
.ajnav{margin-inline-start:auto;display:flex;align-items:center;gap:2px}
.ajnav a{font-family:var(--aj-kufi);font-size:13.5px;line-height:1;color:#E6D9BF;text-decoration:none;padding:10px 10px 11px;border-radius:6px;white-space:nowrap;position:relative}
.ajnav a:hover{color:#fff;background:rgba(255,255,255,.06)}
.ajnav a[aria-current="page"]{color:var(--aj-gold)}
.ajnav a[aria-current="page"]::after{content:"";position:absolute;inset-inline:10px;bottom:3px;height:2px;border-radius:2px;background:var(--aj-gold)}
.ajnav a:focus-visible,.ajbrand:focus-visible,.ajmenu:focus-visible{outline:2px solid var(--aj-gold);outline-offset:2px}
.ajmenu{display:none;margin-inline-start:auto;align-items:center;gap:8px;background:none;border:1px solid rgba(205,168,104,.45);color:var(--aj-ivory);font-family:var(--aj-kufi);font-size:13.5px;padding:7px 12px;border-radius:8px;cursor:pointer}
.ajmenu i{display:block;width:16px;height:10px;position:relative;border-top:2px solid currentColor;border-bottom:2px solid currentColor}
.ajmenu i::after{content:"";position:absolute;inset-inline:0;top:2px;height:2px;background:currentColor}
@media (max-width:980px){
  .ajmenu{display:flex}
  .ajnav{display:none;position:absolute;top:62px;inset-inline:0;background:var(--aj-mud);flex-direction:column;align-items:stretch;gap:0;padding:6px 14px 16px;border-bottom:1px solid rgba(205,168,104,.28);box-shadow:0 18px 30px rgba(20,12,5,.35)}
  .ajbar.open .ajnav{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}
  .ajnav a{font-size:15px;padding:14px 10px;border-bottom:1px solid rgba(205,168,104,.16);border-radius:0}
  .ajnav a[aria-current="page"]::after{display:none}
}
@media (max-width:600px){
  .ajbar-in{padding:0 14px;height:58px}
  .ajnav{top:58px}
  .ajbrand img{height:34px}
  .ajbrand span{font-size:23px}
}

/* ---------- رأس الصفحات الداخلية ---------- */
.ajhead{position:relative;background:var(--aj-mud);color:var(--aj-ivory);padding:30px 0 52px;overflow:hidden}
.ajhead::before{content:"";position:absolute;inset:0;background:radial-gradient(120% 140% at 85% 0%,rgba(205,168,104,.16),transparent 55%);pointer-events:none}
.ajhead::after{content:"";position:absolute;inset-inline:0;bottom:0;height:13px;background:var(--aj-cren-plaster) repeat-x left bottom}
.ajhead-in{position:relative;max-width:760px;margin:0 auto;padding:0 22px}
.ajcrumbs{font-family:var(--aj-kufi);font-size:12.5px;line-height:1.8;color:#C9B795;margin:0 0 10px}
.ajcrumbs a{color:#E6D9BF;text-decoration:none;border-bottom:1px solid rgba(205,168,104,.45)}
.ajcrumbs a:hover{color:#fff}
.ajcrumbs span{opacity:.6;margin:0 6px}
.ajhead h1,.ajhead h2{border:0;padding:0;font-family:var(--aj-kufi);font-weight:700;font-size:31px;line-height:1.55;color:var(--aj-ivory);margin:0}
.ajhead p{font-family:var(--aj-naskh);font-size:17px;line-height:1.95;color:#E2D5BB;margin:10px 0 0;max-width:640px}
@media (max-width:600px){
  .ajhead{padding:22px 0 44px}
  .ajhead-in{padding:0 16px}
  .ajhead h1,.ajhead h2{font-size:24px}
  .ajhead p{font-size:15.5px}
}

/* ---------- عناوين المحتوى ---------- */
:is(.txt,main,main>section)>h2:not([class]){font-family:var(--aj-kufi);font-weight:700;font-size:24px;line-height:1.6;color:#3E2B17;margin:56px 0 12px;padding:0;border:0}
:is(.txt,main,main>section)>h2:not([class])::before{content:"";display:inline-block;width:22px;height:12px;margin-inline-end:10px;vertical-align:middle;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Cg fill='%23B48C4C'%3E%3Cpath d='M0 12L3.5 5L7 12Z'/%3E%3Cpath d='M7.5 12L11 3L14.5 12Z'/%3E%3Cpath d='M15 12L18.5 5L22 12Z'/%3E%3C/g%3E%3C/svg%3E") no-repeat}
:is(.txt,main,main>section)>h3:not([class]){display:flex;align-items:center;gap:14px;font-family:var(--aj-kufi);font-weight:700;font-size:18.5px;line-height:1.7;color:#4A3019;margin:44px 0 8px;padding:0;border:0}
:is(.txt,main,main>section)>h3:not([class])::after{content:"";flex:1;height:1px;background:linear-gradient(to left,#CDB78E,rgba(205,183,142,0))}
@media (max-width:600px){
  :is(.txt,main,main>section)>h2:not([class]){font-size:20.5px;margin-top:44px}
  :is(.txt,main,main>section)>h3:not([class]){font-size:17px;margin-top:36px}
}

/* ---------- الصور داخل المحتوى ---------- */
main .figure{max-width:580px}
main .figure img{width:auto;max-width:100%;height:auto;max-height:640px;margin:0 auto;border-radius:6px}

/* ---------- روابط داخل المحتوى ---------- */
:where(main a:not([class])){color:#7A5524;text-decoration-thickness:1px;text-underline-offset:4px}
:where(main a:not([class]):hover){color:#4A3019}

/* ---------- التذييل ---------- */
.ajfoot{position:relative;background:var(--aj-mud);color:#D9CBAE;margin-top:70px;padding:44px 22px 38px;text-align:center;font-family:var(--aj-naskh);font-size:14px;line-height:1.9}
.ajfoot::before{content:"";position:absolute;inset-inline:0;top:-12px;height:13px;background:var(--aj-cren-mud) repeat-x left bottom}
.ajfoot .fb{display:inline-flex;align-items:center;gap:10px;color:var(--aj-ivory);text-decoration:none;margin-bottom:10px}
.ajfoot .fb img{height:46px;width:auto}
.ajfoot .fb span{font-family:var(--aj-ruqaa);font-weight:700;font-size:28px;line-height:1;padding-top:6px}
.ajfoot .fs{margin:0 auto;max-width:560px;color:#BFAE8C;font-size:13.5px}
.ajfoot .fl{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 22px;margin-top:14px;font-family:var(--aj-kufi);font-size:13px}
.ajfoot .fl a,.ajfoot .fl button{color:var(--aj-gold);text-decoration:none;background:none;border:0;padding:4px 0;font:inherit;cursor:pointer;border-bottom:1px solid rgba(205,168,104,.35)}
.ajfoot .fl a:hover,.ajfoot .fl button:hover{color:#F1D9A8}
.ajfoot a:focus-visible,.ajfoot button:focus-visible{outline:2px solid var(--aj-gold);outline-offset:3px}

/* ---------- عناوين الأقسام: فتحات مثلثة نجدية ---------- */
.ajvent{display:inline-block;width:22px;height:12px;margin-inline-end:10px;vertical-align:middle;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Cg fill='%23B48C4C'%3E%3Cpath d='M0 12L3.5 5L7 12Z'/%3E%3Cpath d='M7.5 12L11 3L14.5 12Z'/%3E%3Cpath d='M15 12L18.5 5L22 12Z'/%3E%3C/g%3E%3C/svg%3E") no-repeat}

@media print{
  .ajbar,.ajfoot .fl{display:none!important}
  .ajhead{background:#fff!important;color:#000!important;padding:0 0 10px}
  .ajhead::before,.ajhead::after,.ajfoot::before{display:none}
  .ajhead h1,.ajhead p,.ajcrumbs{color:#000!important}
  .ajfoot{background:#fff!important;color:#000!important}
}

/* ===== طابع العمارة النجدية: جدران الطين والشرفات والفتحات المثلثة والأبواب المنقوشة ===== */
:root{
  --aj-cut:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpath d='M0 0H32V16H29L16 1.5L3 16H0Z'/%3E%3C/svg%3E");
  --aj-merlon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpath d='M3 16L16 1.5L29 16Z'/%3E%3C/svg%3E");
  --aj-paint:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='9'%3E%3Crect width='24' height='9' fill='%2322150A'/%3E%3Cpath d='M0 9L6 1L12 9Z M12 9L18 1L24 9Z' fill='%23C9A15E'/%3E%3Cpath d='M6 1L12 9L18 1Z' fill='%23E8DABD'/%3E%3Cpath d='M18 1L24 9L24 1Z M0 1L0 9L6 1Z' fill='%23E8DABD'/%3E%3C/svg%3E");
  --aj-vents:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='56'%3E%3Cpath d='M40 15L48 0L56 15Z' fill='%231E1006' fill-opacity='.82'/%3E%3Cpath d='M40 15H56' stroke='%23E9D8B8' stroke-opacity='.35'/%3E%3Cpath d='M28 35L36 20L44 35Z' fill='%231E1006' fill-opacity='.82'/%3E%3Cpath d='M28 35H44' stroke='%23E9D8B8' stroke-opacity='.35'/%3E%3Cpath d='M52 35L60 20L68 35Z' fill='%231E1006' fill-opacity='.82'/%3E%3Cpath d='M52 35H68' stroke='%23E9D8B8' stroke-opacity='.35'/%3E%3Cpath d='M16 55L24 40L32 55Z' fill='%231E1006' fill-opacity='.82'/%3E%3Cpath d='M16 55H32' stroke='%23E9D8B8' stroke-opacity='.35'/%3E%3Cpath d='M40 55L48 40L56 55Z' fill='%231E1006' fill-opacity='.82'/%3E%3Cpath d='M40 55H56' stroke='%23E9D8B8' stroke-opacity='.35'/%3E%3Cpath d='M64 55L72 40L80 55Z' fill='%231E1006' fill-opacity='.82'/%3E%3Cpath d='M64 55H80' stroke='%23E9D8B8' stroke-opacity='.35'/%3E%3C/svg%3E");
}
html{background:#F6EFE2}
html body{background:#F6EFE2 url(/img/tex/plaster.webp) repeat}
html body main{background:transparent}

/* الشريط العلوي: عتبة خشب، وتحته شريط مثلثات منقوشة مثل نقوش الأبواب النجدية */
html .ajbar{background:#22150A;border-bottom:0}
html .ajbar::after{content:"";position:absolute;inset-inline:0;bottom:-9px;height:9px;background:var(--aj-paint) repeat-x left top;z-index:1;pointer-events:none}
html .ajnav{z-index:3}

/* رأس الصفحة: جدار طين، تعلوه ظلال العتبة، وفيه فتحات مثلثة، وينتهي بشرفات */
html .ajhead{background:#8F6A45 url(/img/tex/mud.webp) repeat;padding:44px 0 66px;
  -webkit-mask:linear-gradient(#000 0 0) top/100% calc(100% - 16px) no-repeat,var(--aj-cut) left bottom/32px 16px repeat-x;
          mask:linear-gradient(#000 0 0) top/100% calc(100% - 16px) no-repeat,var(--aj-cut) left bottom/32px 16px repeat-x}
html .ajhead::before{background:linear-gradient(to bottom,rgba(24,12,4,.55),rgba(24,12,4,0) 34%),linear-gradient(to left,rgba(24,12,4,.28),rgba(24,12,4,0) 70%)}
html .ajhead::after{content:"";position:absolute;bottom:34px;inset-inline-end:max(20px,calc(50% - 520px));inset-inline-start:auto;width:96px;height:56px;background:var(--aj-vents) no-repeat;opacity:.9}
html .ajhead h1,html .ajhead h2{color:#FFF7E8;text-shadow:0 1px 3px rgba(30,15,5,.45)}
html .ajcrumbs{color:#F0E2C6}
html .ajcrumbs a{color:#FFF4DF;border-bottom-color:rgba(255,236,200,.55)}
html .ajhead p{color:#F6EAD3;text-shadow:0 1px 2px rgba(30,15,5,.4)}
@media (max-width:600px){
  html .ajhead{padding:30px 0 56px}
  html .ajhead::after{width:72px;height:42px;background-size:72px 42px;bottom:26px;opacity:.75}
}

/* التذييل: جدار طين داكن ترتفع منه الشرفات */
html .ajfoot{background:#5C3F27 url(/img/tex/mud-dark.webp) repeat;margin-top:86px;padding-top:84px}
html .ajfoot::before{top:-16px;height:16px;background:#5C3F27 url(/img/tex/mud-dark.webp) repeat;background-position:0 -496px;
  -webkit-mask:var(--aj-merlon) left bottom/32px 16px repeat-x;mask:var(--aj-merlon) left bottom/32px 16px repeat-x}
html .ajfoot::after{content:"";position:absolute;top:22px;left:50%;width:96px;height:56px;margin-left:-48px;background:var(--aj-vents) no-repeat;opacity:.8}
html .ajfoot .fs{color:#DCCBA9}

/* ===== العناوين الرئيسية بخط الرقعة ===== */
html .ajhead h1,html .ajhead h2{font-family:var(--aj-ruqaa);font-weight:700;font-size:42px;line-height:1.45;padding-top:2px}
:is(.txt,main,main>section)>h2:not([class]),html .sec-h{font-family:var(--aj-ruqaa);font-weight:700;font-size:32px;line-height:1.5;color:#3A2614}
html .era-t{font-family:var(--aj-ruqaa);font-weight:700;font-size:28px;line-height:1.5;color:#4A2E17}
@media (max-width:600px){
  html .ajhead h1,html .ajhead h2{font-size:32px}
  :is(.txt,main,main>section)>h2:not([class]),html .sec-h{font-size:26px}
  html .era-t{font-size:25px}
}
