/*
Theme Name: Buyut Alazl – Motion Plus V2.2 Articles Fix
Theme URI: https://example.com/
Author: OpenAI
Description: قالب عربي متجاوب لشركة بيوت العزل للمقاولات العامة.
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: buyut-alazl-motion-v2-2
*/
:root{--green:#004b2c;--green2:#00643b;--gold:#f6bd2e;--cream:#fffaf0;--ink:#073d29;--muted:#5b6b60;--pale:#eaf3d7;--shadow:0 5px 18px #163d2517}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:Tahoma,Arial,sans-serif;line-height:1.7}a{color:inherit;text-decoration:none}.container{width:min(1160px,92%);margin:auto}.topbar{background:#003c25;color:#fff;font-size:14px}.topbar .container{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 0;flex-wrap:wrap}.topinfo{display:flex;align-items:center;gap:22px}.pin{font-size:18px;color:var(--gold);margin-left:5px}.social{display:flex;gap:12px}.social a{width:28px;height:28px;border-radius:50%;background:#fff;color:var(--green);display:grid;place-items:center;font-weight:bold}.mainnav{background:#fffdf6;box-shadow:0 3px 12px #0000000c;position:sticky;top:0;z-index:20}.navinner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 0}.brand{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:900;color:var(--green);line-height:1.2}.brandmark{font-size:35px;color:var(--gold)}.brand small{display:block;font-size:12px}.navlinks{display:flex;align-items:center;gap:26px;font-weight:bold}.navlinks a:hover{color:#b77d00}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;padding:12px 25px;background:linear-gradient(110deg,#ffd75d,#f2ad13);color:#142d1b;font-weight:900;box-shadow:0 4px 10px #9a6c1e2b;cursor:pointer}.hero{background:var(--green);color:white;overflow:hidden}.hero-grid{display:grid;grid-template-columns:1.05fr 1fr;min-height:365px}.hero-photo{min-height:365px;background:url('assets/images/hero-roof.jpg') center/cover no-repeat;border-radius:0 0 110px 0;border-left:9px solid var(--gold)}.hero-copy{padding:38px 5% 35px;display:flex;flex-direction:column;justify-content:center;text-align:right}.hero h1{font-size:clamp(32px,4vw,54px);line-height:1.25;margin:0 0 4px}.hero h1 span{color:var(--gold)}.hero-lead{display:inline-block;background:linear-gradient(90deg,#ffd65c,#f0ae17);color:#073d29;border-radius:40px;padding:8px 18px;font-size:19px;font-weight:900;margin:10px 0}.hero ul{list-style:none;padding:0;margin:8px 0 18px}.hero li:before{content:'✓';display:inline-grid;place-items:center;background:var(--gold);color:#063c27;border-radius:50%;width:21px;height:21px;margin-left:9px;font-weight:bold}.section{padding:38px 0}.section-title{text-align:center;font-size:29px;margin:0 0 25px;color:var(--green);display:flex;align-items:center;justify-content:center;gap:18px}.section-title:before,.section-title:after{content:'';height:3px;width:min(22%,150px);background:var(--gold);border-radius:9px}.cards{display:grid;grid-template-columns:repeat(5,1fr);gap:13px}.service{background:#fffdf6;border:1px solid #f0dfb8;border-radius:18px;padding:20px 12px;text-align:center;box-shadow:var(--shadow);font-weight:800}.service .ico{font-size:36px;display:block;color:var(--green);margin-bottom:5px}.why{background:var(--pale);border-radius:32px;padding:26px 28px;display:grid;grid-template-columns:repeat(4,1fr);gap:14px;box-shadow:var(--shadow)}.why h2{grid-column:1/-1;text-align:center;margin:0;font-size:27px}.whyitem{text-align:center;border-left:1px solid #b9cda7;padding:4px 10px}.whyitem:last-child{border:0}.whyitem b{font-size:34px;display:block}.whyitem strong{display:block}.project-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.project{position:relative;border-radius:16px;overflow:hidden;box-shadow:var(--shadow);background:#fff}.project img{width:100%;height:160px;display:block;object-fit:cover}.tag{position:absolute;bottom:12px;right:50%;transform:translateX(50%);background:var(--green);color:#fff;border-radius:30px;padding:2px 18px;font-weight:bold;white-space:nowrap}.areas{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}.area{background:#e3f0c9;border-radius:35px;padding:10px 22px;font-weight:800;box-shadow:var(--shadow)}.contact{background:var(--green);color:#fff;border-radius:34px;padding:30px;margin:15px auto;display:grid;grid-template-columns:1fr 1.25fr;gap:25px;align-items:center}.contact h2{font-size:32px;margin:0}.contact p{margin:3px 0}.contact-form{display:grid;grid-template-columns:1fr 1fr;gap:10px}.contact-form input,.contact-form textarea{width:100%;padding:14px;border:0;border-radius:12px;font:inherit}.contact-form textarea{grid-column:1/-1;min-height:85px}.contact-form button{grid-column:1/-1}.notice{padding:10px 14px;background:#e8f5dc;color:#16462d;border-radius:10px;margin-bottom:12px}.reviews{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.review{background:#fffdf6;border:1px solid #f0dfb8;border-radius:18px;padding:22px;text-align:center;box-shadow:var(--shadow)}.stars{color:#f4b322;font-size:22px;letter-spacing:3px}.review p{margin:8px 0}.review strong{color:var(--green)}footer{background:#003c25;color:white;padding:30px 0;margin-top:30px;border-top:8px solid #1a713c}footer .container{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}.footlinks{display:flex;gap:16px;flex-wrap:wrap}.menu-toggle{display:none;background:var(--green);color:white;border:0;border-radius:8px;padding:8px 12px;font-size:20px}
@media(max-width:850px){.navlinks{display:none;position:absolute;top:100%;right:4%;left:4%;background:#fffdf6;padding:18px;border-radius:14px;box-shadow:var(--shadow);flex-direction:column;align-items:stretch}.navlinks.open{display:flex}.menu-toggle{display:block}.navinner>.btn{display:none}.hero-grid{grid-template-columns:1fr}.hero-photo{order:2;min-height:240px;border-radius:0;border-left:0;border-top:7px solid var(--gold)}.hero-copy{padding:30px 5%}.cards{grid-template-columns:repeat(2,1fr)}.why{grid-template-columns:repeat(2,1fr)}.whyitem:nth-child(3){border-left:0}.project-grid{grid-template-columns:repeat(2,1fr)}.contact{grid-template-columns:1fr}.reviews{grid-template-columns:1fr}.section{padding:28px 0}}
@media(max-width:480px){.topbar .container,.topinfo{justify-content:center}.topinfo{gap:10px;font-size:12px}.brand{font-size:20px}.hero h1{font-size:34px}.hero-lead{font-size:16px}.section-title{font-size:23px}.cards{gap:8px}.service{padding:14px 7px;font-size:14px}.why{padding:20px 12px}.whyitem{font-size:14px}.project img{height:125px}.contact{padding:22px 16px}.contact-form{grid-template-columns:1fr}.contact-form textarea,.contact-form button{grid-column:auto}footer .container{justify-content:center;text-align:center}}


/* الإصلاحات: ترتيب ثابت للواجهة والقائمة */
.mainnav { direction: rtl; }
.navinner { display:flex !important; flex-direction:row !important; flex-wrap:nowrap; }
.brand { flex:0 0 auto; }
.navlinks { display:flex !important; flex:1 1 auto; justify-content:center; gap:clamp(10px,1.7vw,26px); white-space:nowrap; }
.menu-toggle { display:none !important; }
.navinner > .btn { flex:0 0 auto; white-space:nowrap; }

.hero-grid {
  direction:ltr;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1.05fr) !important;
  grid-template-areas:"photo copy";
  min-height:390px;
}
.hero-photo { grid-area:photo; min-width:0; min-height:390px; }
.hero-copy {
  grid-area:copy;
  direction:rtl;
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  color:#fff !important;
  min-width:0;
  padding:38px clamp(20px,4vw,60px);
}
.hero-copy h1,.hero-copy .hero-lead,.hero-copy ul,.hero-copy li,.hero-copy a { visibility:visible !important; opacity:1 !important; }
.hero-copy h1 { color:#fff !important; }
.hero-copy h1 span { color:var(--gold) !important; }
.hero-copy .hero-lead { color:#073d29 !important; }
.hero-copy ul { color:#fff !important; }
@media(max-width:850px) {
  .navinner { flex-wrap:wrap; }
  .navlinks { display:none !important; position:absolute; top:100%; right:4%; left:4%; flex-direction:column; white-space:normal; }
  .navlinks.open { display:flex !important; }
  .menu-toggle { display:block !important; }
  .hero-grid {
    direction:rtl;
    grid-template-columns:1fr !important;
    grid-template-areas:"copy" "photo";
  }
  .hero-copy { grid-area:copy; }
  .hero-photo { grid-area:photo; min-height:240px; }
}
@media(max-width:480px) {
  .topbar .container { align-items:center; }
  .topinfo { flex-wrap:wrap; }
}


/* Motion inspired by the reference site's image transitions and interactive cards */
:root { scroll-padding-top: 90px; }
.areas-intro { text-align:center; color:var(--muted); margin:-12px 0 18px; }
.area { transition:transform .28s ease, box-shadow .28s ease, background .28s ease; }
.area:hover { transform:translateY(-6px) scale(1.035); background:#d7ebba; box-shadow:0 12px 24px #163d2525; }
.service,.review,.project,.whyitem { transition:transform .35s ease, box-shadow .35s ease; }
.service:hover,.review:hover { transform:translateY(-8px); box-shadow:0 16px 30px #163d2526; }
.project { isolation:isolate; }
.project img { transition:transform .65s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.project:hover img { transform:scale(1.09); filter:saturate(1.12); }
.project:after { content:""; position:absolute; inset:0; background:linear-gradient(135deg,#ffffff00 35%,#ffffff38 50%,#ffffff00 65%); transform:translateX(-120%); transition:transform .8s ease; pointer-events:none; }
.project:hover:after { transform:translateX(120%); }
.hero-photo { position:relative; animation:heroReveal .9s both; }
.hero-photo:after { content:""; position:absolute; inset:0; background:linear-gradient(110deg,transparent 30%,#ffffff2b 50%,transparent 70%); transform:translateX(-120%); animation:photoShine 7s ease-in-out 1.2s infinite; pointer-events:none; }
.hero-copy > * { animation:copyRise .7s both; }
.hero-copy > *:nth-child(2) { animation-delay:.12s; }
.hero-copy > *:nth-child(3) { animation-delay:.22s; }
.hero-copy > *:nth-child(4) { animation-delay:.32s; }
.reveal-ready [data-reveal] { opacity:0; transform:translateY(28px); transition:opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal-ready [data-reveal].is-visible { opacity:1; transform:translateY(0); }
@keyframes heroReveal { from { opacity:0; transform:scale(1.045); } to { opacity:1; transform:scale(1); } }
@keyframes copyRise { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
@keyframes photoShine { 0%,65%,100% { transform:translateX(-120%); } 82% { transform:translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
  .reveal-ready [data-reveal] { opacity:1; transform:none; }
}

/* Project captions: source photos are clean crops; show exactly one crisp overlay label. */
.project { position:relative; }
.project .tag {
  z-index:3; display:inline-flex; align-items:center; justify-content:center;
  min-height:46px; line-height:1.35; padding:7px 24px;
  bottom:12px; right:50%; transform:translateX(50%);
  white-space:nowrap; text-shadow:none; box-shadow:0 4px 12px rgba(0,45,25,.18);
}
.project .tag::before, .project .tag::after { content:none !important; display:none !important; }
.project::after { z-index:1; }


/* Motion Plus V2: animated facts, refined transitions and polished interaction states. */
.stats-band {
  position:relative; overflow:hidden; padding:24px 0;
  background:linear-gradient(110deg,#f2f7e9 0%,#fffaf0 52%,#edf5df 100%);
  border-top:1px solid #e8efd9; border-bottom:1px solid #e8efd9;
}
.stats-band:before,.stats-band:after {
  content:""; position:absolute; width:170px; height:170px; border:1px solid #d9e7c8;
  border-radius:50%; opacity:.65; pointer-events:none;
}
.stats-band:before { top:-115px; right:7%; }
.stats-band:after { bottom:-130px; left:8%; }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; position:relative; z-index:1; }
.stat-card {
  text-align:center; padding:12px 10px; border-left:1px solid #d5e2c8;
  display:flex; flex-direction:column; align-items:center; gap:2px;
}
.stat-card:last-child { border-left:0; }
.stat-number { color:var(--green); font-size:clamp(32px,4vw,46px); font-weight:1000; line-height:1.2; }
.stat-number:after { content:"+"; color:#d69b13; font-size:.65em; margin-right:3px; }
.stat-label { color:var(--muted); font-weight:800; font-size:15px; }
.btn { position:relative; overflow:hidden; transition:transform .25s ease,box-shadow .25s ease,filter .25s ease; }
.btn:before {
  content:""; position:absolute; top:-40%; bottom:-40%; right:-65%; width:38%;
  transform:skewX(-22deg); background:#ffffff70; transition:right .65s ease;
}
.btn:hover { transform:translateY(-3px); box-shadow:0 12px 24px #9a6c1e38; filter:saturate(1.08); }
.btn:hover:before { right:130%; }
.navlinks a { position:relative; transition:color .25s ease; }
.navlinks a:after {
  content:""; position:absolute; right:0; left:100%; bottom:-7px; height:2px;
  background:var(--gold); transition:left .28s ease;
}
.navlinks a:hover:after { left:0; }
.brandmark { display:inline-block; transition:transform .35s ease; }
.brand:hover .brandmark { transform:rotate(-12deg) scale(1.08); }
.service { position:relative; overflow:hidden; }
.service:after {
  content:""; position:absolute; width:95px; height:95px; border-radius:50%;
  background:#f6bd2e18; left:-45px; bottom:-50px; transform:scale(.65);
  transition:transform .45s ease;
}
.service:hover:after { transform:scale(1.65); }
.service .ico { transition:transform .35s ease; }
.service:hover .ico { transform:translateY(-5px) rotate(-7deg) scale(1.12); }
.whyitem b { transition:transform .35s ease; }
.whyitem:hover b { transform:translateY(-5px) scale(1.12); }
.review { transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease; }
.review:hover { border-color:#e7c66e; }
.contact { position:relative; overflow:hidden; }
.contact:after {
  content:""; position:absolute; width:260px; height:260px; border:1px solid #ffffff20;
  border-radius:50%; left:-110px; top:-150px; pointer-events:none;
}
.project .tag { transition:transform .3s ease,background .3s ease,box-shadow .3s ease; }
.project:hover .tag { transform:translateX(50%) translateY(-4px); background:#087044; box-shadow:0 8px 18px #003c2540; }
.reveal-ready [data-reveal] { will-change:opacity,transform; }
@media(max-width:650px) {
  .stats-grid { gap:4px; }
  .stat-card { padding:8px 4px; }
  .stat-label { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  .reveal-ready [data-reveal] { opacity:1 !important; transform:none !important; }
}


/* Floating animated bubbles/orbs inspired by the reference site's moving circles. */
.hero { position:relative; isolation:isolate; overflow:hidden; }
.hero-orbs {
  position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none;
}
.hero-orbs .moving-orb {
  position:absolute; display:block; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle at 32% 28%,#ffffffd9 0%,#f5d98a9c 18%,#c7952b55 48%,#c7952b08 72%);
  border:1px solid #d9b65b55;
  box-shadow:0 8px 28px #97701d18,inset 0 0 16px #ffffff70;
  animation:orb-drift 9s ease-in-out infinite alternate,orb-glow 4.8s ease-in-out infinite;
}
.hero-orbs .orb-one { width:74px;height:74px;top:13%;right:8%;animation-delay:-1s,0s; }
.hero-orbs .orb-two { width:30px;height:30px;top:61%;right:19%;animation-delay:-4s,-1s; }
.hero-orbs .orb-three { width:52px;height:52px;top:24%;left:10%;animation-delay:-2.5s,-2s; }
.hero-orbs .orb-four { width:22px;height:22px;top:75%;left:17%;animation-delay:-6s,-.5s; }
.hero-orbs .orb-five { width:42px;height:42px;top:47%;left:47%;animation-delay:-3.5s,-1.5s; }
.hero-orbs .orb-six { width:16px;height:16px;top:17%;left:58%;animation-delay:-5s,-2.5s; }
@keyframes orb-drift {
  0% { transform:translate3d(0,0,0) scale(.92); }
  50% { transform:translate3d(22px,-30px,0) scale(1.08); }
  100% { transform:translate3d(-16px,24px,0) scale(.96); }
}
@keyframes orb-glow {
  0%,100% { opacity:.42; filter:blur(.1px); }
  50% { opacity:.95; filter:blur(1px); }
}
.hero > :not(.hero-orbs) { position:relative; z-index:1; }
@media(max-width:700px) {
  .hero-orbs .orb-one { width:48px;height:48px; }
  .hero-orbs .orb-three { width:34px;height:34px; }
  .hero-orbs .orb-five { width:28px;height:28px; }
}
@media(prefers-reduced-motion:reduce) {
  .hero-orbs .moving-orb { animation:none !important; }
}

.article-wrap{max-width:900px;margin:42px auto;padding:28px;background:#fff;border-radius:20px;box-shadow:var(--shadow)}
.article-title{font-size:clamp(26px,4vw,40px);line-height:1.4;margin:0 0 12px;color:var(--green)}
.article-meta{color:var(--muted);font-size:14px;margin:0 0 22px}
.article-thumb{width:100%;height:auto;max-height:480px;object-fit:cover;border-radius:16px;margin:12px 0 24px}
.article-content{font-size:18px;line-height:2;color:#26382e;overflow-wrap:anywhere}
.article-content img{max-width:100%;height:auto;border-radius:12px}
.article-content a{color:var(--green2);text-decoration:underline}
.article-content h2,.article-content h3{color:var(--green);margin-top:28px}
.article-nav{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:30px;padding-top:20px;border-top:1px solid #e4eadf}
.posts-list{max-width:1100px;margin:42px auto;padding:0 18px}
.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:22px}
.post-card{background:#fff;border-radius:18px;overflow:hidden;box-shadow:var(--shadow);padding:18px}
.post-card img{width:100%;height:190px;object-fit:cover;border-radius:12px}
.post-card h2{font-size:22px;line-height:1.5;color:var(--green)}
.post-card p{color:var(--muted)}
.post-card a{text-decoration:none}
.pagination{margin:28px 0;text-align:center}
.pagination .page-numbers{display:inline-block;padding:8px 13px;margin:3px;background:#fff;border-radius:9px}
