@font-face{
  font-family:"Bahij";
  src: local("Bahij TheSansArabic"), local("Bahij TheSansArabic Bold"), local("Bahij");
}
:root{
  --mauve:#3d213d;
  --mauve-2:#5a3358;
  --cream:#f3efe8;
  --gold:#b39767;
  --ink:#171417;
  --muted:#80777f;
  --line:rgba(255,255,255,.14);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"Bahij","Tajawal","Arial",sans-serif;background:var(--cream);color:var(--ink);overflow-x:hidden}
button,a,input,select,textarea{font:inherit}
button{cursor:pointer}
a{text-decoration:none;color:inherit}
.grain{pointer-events:none;position:fixed;inset:0;opacity:.05;z-index:1000;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E")}
.topbar{position:fixed;top:0;right:0;left:0;height:82px;display:flex;align-items:center;justify-content:space-between;padding:0 5vw;z-index:100;background:linear-gradient(to bottom,rgba(13,10,13,.68),transparent);color:white}
.brand{display:flex;align-items:center;gap:14px}.brand-mark{font-weight:900;letter-spacing:2px}.brand-ar{font-size:14px;opacity:.75}
nav{display:flex;gap:30px;font-size:14px}nav a{opacity:.75;transition:.3s}nav a:hover{opacity:1}
.ghost,.secondary{background:transparent;border:1px solid rgba(255,255,255,.35);color:white;padding:12px 18px;border-radius:999px}
.hero{height:100vh;min-height:720px;position:relative;color:white;display:flex;align-items:center;padding:0 8vw;overflow:hidden}
.hero-backdrop,.project-image,.experience-image,.detail-hero{background-size:cover;background-position:center}
.hero-backdrop{position:absolute;inset:0;background:
linear-gradient(100deg,rgba(19,12,20,.94) 0%,rgba(32,17,33,.56) 48%,rgba(14,12,14,.15) 75%),
radial-gradient(circle at 76% 38%,#8f7566 0,transparent 28%),
linear-gradient(135deg,#6c5e59 0%,#3f3437 36%,#171416 100%)}
.hero-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(10,8,10,.75))}
.hero-content{position:relative;z-index:2;max-width:740px}.eyebrow{font-size:12px;letter-spacing:2.4px;color:var(--gold);font-weight:800}
.hero h1{font-size:clamp(56px,7.5vw,110px);line-height:.92;margin:24px 0 28px;font-weight:900}
.hero h1 span{color:#dccbac}.hero p{max-width:600px;font-size:19px;line-height:1.8;color:rgba(255,255,255,.74)}
.hero-actions{display:flex;gap:12px;margin-top:34px}.primary{display:inline-flex;align-items:center;justify-content:center;border:none;background:var(--gold);color:#1e1718;padding:15px 24px;border-radius:999px;font-weight:800}
.secondary{padding:14px 22px}.scroll-hint{position:absolute;z-index:2;bottom:30px;left:5vw;font-size:12px;opacity:.55}
.section{padding:120px 6vw}.section-head{display:flex;align-items:end;justify-content:space-between;gap:40px;margin-bottom:45px}.section-head h2{font-size:clamp(38px,5vw,68px);margin:8px 0 0}.section-head p{max-width:460px;line-height:1.9;color:#6d666b}
.project-grid{display:grid;grid-template-columns:1.35fr .85fr;gap:20px}.project-card{height:600px;border-radius:30px;overflow:hidden;position:relative;color:white}.project-image{position:absolute;inset:0;transition:transform 1s cubic-bezier(.2,.8,.2,1)}.project-card:hover .project-image{transform:scale(1.055)}
.project-a{background:
linear-gradient(180deg,transparent,rgba(24,15,25,.2)),
linear-gradient(135deg,#b7aea7,#77706c 45%,#383236)}
.project-b{background:
linear-gradient(180deg,transparent,rgba(24,15,25,.25)),
linear-gradient(135deg,#9f9b96,#69645f 48%,#292528)}
.project-overlay{position:absolute;inset:0;background:linear-gradient(180deg,transparent 35%,rgba(17,12,17,.85))}
.project-copy{position:absolute;right:34px;left:34px;bottom:32px}.project-copy h3{font-size:44px;margin:6px 0}.project-copy p{opacity:.7}.project-count{font-size:12px;color:#d8c093}.arrow-btn{border:0;background:none;color:white;padding:0;margin-top:10px}
.models-section{background:#171317;color:white;padding:120px 0 90px;overflow:hidden}.section-head.dark{padding:0 6vw}.section-head.dark p{color:rgba(255,255,255,.55)}
.carousel-wrap{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible}
.carousel{
  width:100%;
  height:500px;
  position:relative;
  perspective:1800px;
  perspective-origin:50% 48%;
  transform-style:preserve-3d;
  touch-action:pan-y;
  user-select:none;
  cursor:grab;
}
.carousel.dragging{cursor:grabbing}
.card3d{
  position:absolute;
  top:38px;
  left:50%;
  width:min(58vw,760px);
  height:405px;
  border-radius:30px;
  overflow:hidden;
  transform-style:preserve-3d;
  will-change:transform,opacity,filter;
  box-shadow:0 34px 90px rgba(0,0,0,.35);
  transition:
    transform 950ms cubic-bezier(.16,1,.3,1),
    opacity 700ms cubic-bezier(.16,1,.3,1),
    filter 850ms cubic-bezier(.16,1,.3,1),
    box-shadow 850ms cubic-bezier(.16,1,.3,1);
  backface-visibility:hidden;
}
.carousel.dragging .card3d{
  transition:none !important;
}
.card3d .img{
  position:absolute;
  inset:-2%;
  background-size:cover;
  transform:translateZ(1px) scale(1.04);
  transition:transform 1100ms cubic-bezier(.16,1,.3,1);
}
.card3d[data-pos="0"] .img{transform:translateZ(1px) scale(1.015)}
.card3d .shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 42%,rgba(8,8,8,.86))}
.card3d .label{position:absolute;bottom:28px;right:30px;transform:translateZ(42px)}
.card3d .label h3{font-size:44px;margin:4px 0}.card3d .label span{font-size:12px;color:#d9c89f}

.card3d[data-pos="0"]{
  transform:translate3d(-50%,0,110px) rotateY(0deg) scale(1);
  opacity:1;
  z-index:6;
  filter:brightness(1) saturate(1);
  box-shadow:0 42px 110px rgba(0,0,0,.42);
}
.card3d[data-pos="-1"]{
  transform:translate3d(-122%,-2px,-90px) rotateY(-28deg) scale(.82);
  opacity:.68;
  z-index:4;
  filter:brightness(.78) saturate(.72);
}
.card3d[data-pos="1"]{
  transform:translate3d(22%,-2px,-90px) rotateY(28deg) scale(.82);
  opacity:.68;
  z-index:4;
  filter:brightness(.78) saturate(.72);
}
.card3d[data-pos="-2"]{
  transform:translate3d(-171%,8px,-260px) rotateY(-38deg) scale(.66);
  opacity:.20;
  z-index:2;
  filter:brightness(.6) saturate(.45) blur(.6px);
}
.card3d[data-pos="2"]{
  transform:translate3d(71%,8px,-260px) rotateY(38deg) scale(.66);
  opacity:.20;
  z-index:2;
  filter:brightness(.6) saturate(.45) blur(.6px);
}
.card3d.hidden{
  transform:translate3d(-50%,15px,-520px) scale(.48);
  opacity:0;
  pointer-events:none;
  filter:blur(3px);
}
.nav-arrow{position:absolute;z-index:20;width:54px;height:54px;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.07);color:white;font-size:32px;backdrop-filter:blur(10px);transition:transform .3s ease,background .3s ease}
.nav-arrow:hover{transform:scale(1.07);background:rgba(255,255,255,.12)}
.prev{right:4vw}.next{left:4vw}
.model-info{display:flex;justify-content:center;gap:46px;padding:0 6vw 20px;color:rgba(255,255,255,.7);transition:opacity .35s ease,transform .35s ease}
.model-info.switching{opacity:0;transform:translateY(8px)}
.model-info .stat strong{display:block;color:white;font-size:18px;margin-bottom:4px}.model-info button{margin-right:20px}
.experience{min-height:760px;display:grid;grid-template-columns:1.1fr .9fr;background:#e8e2da}.experience-media{position:relative;min-height:760px;overflow:hidden}.experience-image{position:absolute;inset:0;background:
linear-gradient(180deg,transparent,rgba(20,15,20,.15)),
linear-gradient(135deg,#b6a99d,#736c67 45%,#393337)}
.play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:88px;height:88px;border-radius:50%;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.16);backdrop-filter:blur(8px);color:white;font-size:24px}
.experience-copy{padding:10vw 7vw;display:flex;flex-direction:column;justify-content:center}.experience-copy h2{font-size:60px;margin:12px 0 22px}.experience-copy p{line-height:2;color:#665f63}.feature-list{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:28px}.feature-list span{border-top:1px solid rgba(0,0,0,.12);padding:14px 0}
.compare-box{display:flex;align-items:end;gap:16px;background:white;padding:25px;border-radius:22px}.compare-box>div{flex:1}.compare-box label{display:block;font-size:12px;color:#7b7276;margin-bottom:8px}.compare-box select{width:100%;border:1px solid #ddd3d6;padding:14px 16px;border-radius:12px;background:white}.small{padding:12px 18px}
.compare-result{margin-top:20px;display:grid;grid-template-columns:1fr 1fr;gap:20px}.compare-card{background:#201820;color:white;padding:24px;border-radius:20px}.compare-card h4{font-size:28px;margin:0 0 14px}.compare-card ul{list-style:none;padding:0;margin:0}.compare-card li{display:flex;justify-content:space-between;padding:9px 0;border-top:1px solid rgba(255,255,255,.08);color:#d8d0d4}
.contact{padding:110px 7vw;background:var(--mauve);color:white;display:flex;justify-content:space-between;align-items:end}.contact h2{font-size:60px;margin:12px 0}.contact-actions{display:flex;gap:10px}
.model-modal{position:fixed;inset:0;background:#eee9e2;z-index:400;overflow:auto;transform:translateY(102%);transition:.55s cubic-bezier(.2,.8,.2,1)}.model-modal.open{transform:none}.close-modal,.close-admin{position:absolute;top:22px;left:24px;z-index:5;border:0;background:rgba(255,255,255,.8);width:46px;height:46px;border-radius:50%;font-size:28px}.detail-hero{height:58vh;background:linear-gradient(135deg,#aea59e,#6b6562 52%,#2c282a)}.detail-content{display:grid;grid-template-columns:1fr 1fr;padding:52px 7vw;gap:50px}.detail-content h2{font-size:64px;margin:8px 0}.detail-content p{line-height:1.9;color:#6f676a}.detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}.detail-stats div{background:white;border-radius:18px;padding:20px}.detail-stats strong{display:block;font-size:28px}.detail-tabs{position:sticky;top:0;display:flex;justify-content:center;gap:8px;padding:14px;background:rgba(238,233,226,.88);backdrop-filter:blur(12px);z-index:3}.detail-tabs button{border:0;background:transparent;padding:10px 18px;border-radius:999px}.detail-tabs .active{background:#241a24;color:white}
.gallery-strip{display:grid;grid-template-columns:1.3fr .7fr .7fr;gap:12px;padding:20px 5vw 70px}.gallery-item{height:360px;border-radius:22px;background:linear-gradient(135deg,#b9b0a9,#5e5757)}
.admin-panel{position:fixed;inset:0;z-index:500;background:#f6f2ed;transform:translateX(-102%);transition:.5s cubic-bezier(.2,.8,.2,1);overflow:auto}.admin-panel.open{transform:none}.admin-head{height:90px;background:#221822;color:white;padding:0 5vw;display:flex;align-items:center;justify-content:space-between;position:relative}.admin-head h3{margin:4px 0 0;font-size:28px}.admin-head .close-admin{position:static;background:rgba(255,255,255,.12);color:white}.admin-layout{display:grid;grid-template-columns:240px 1fr;min-height:calc(100vh - 90px)}.admin-layout aside{background:white;padding:28px 18px;border-left:1px solid #e6dfe0}.admin-layout aside button{width:100%;text-align:right;border:0;background:transparent;padding:14px;border-radius:12px;margin-bottom:6px}.admin-layout aside .active{background:#efe8ec;color:var(--mauve);font-weight:800}.admin-main{padding:38px}.admin-toolbar{display:flex;align-items:center;justify-content:space-between}.admin-toolbar h4{font-size:26px}.admin-cards{display:grid;grid-template-columns:1fr 1fr;gap:14px}.admin-card{background:white;padding:20px;border-radius:18px;display:flex;justify-content:space-between;align-items:center}.admin-card strong,.admin-card span{display:block}.admin-card span{font-size:12px;color:#8a7e84;margin-top:4px}.admin-card button{border:0;background:#eee7eb;padding:10px 14px;border-radius:10px}.admin-form{margin-top:28px;background:white;padding:24px;border-radius:20px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.form-grid input,.form-grid select,.form-grid textarea{border:1px solid #ded5d8;padding:13px 14px;border-radius:10px;background:#fff}.form-grid textarea{min-height:110px}.dropzone{border:1px dashed #b9a9af;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#887b80;min-height:110px}
.toast{position:fixed;right:30px;bottom:30px;background:#211821;color:white;padding:14px 18px;border-radius:14px;z-index:1000;opacity:0;transform:translateY(15px);transition:.3s}.toast.show{opacity:1;transform:none}
@media(max-width:900px){
  nav{display:none}.topbar{height:72px}.brand-ar{display:none}.hero{padding:0 6vw;min-height:680px}.hero h1{font-size:58px}.project-grid,.experience,.detail-content,.admin-layout{grid-template-columns:1fr}.project-card{height:470px}.section{padding:90px 5vw}.section-head{display:block}.section-head p{margin-top:18px}.carousel{height:420px}.card3d{width:76vw;height:330px}.card3d[data-pos="-1"]{transform:translate3d(-110%,-2px,-90px) rotateY(-23deg) scale(.78)}.card3d[data-pos="1"]{transform:translate3d(10%,-2px,-90px) rotateY(23deg) scale(.78)}.model-info{flex-wrap:wrap;gap:18px}.experience-media{min-height:520px}.experience-copy{padding:80px 7vw}.experience-copy h2,.contact h2,.detail-content h2{font-size:44px}.compare-box{display:grid}.compare-result{grid-template-columns:1fr}.contact{display:block}.contact-actions{margin-top:30px}.gallery-strip{grid-template-columns:1fr}.admin-layout aside{display:none}.admin-main{padding:20px}.admin-cards,.form-grid{grid-template-columns:1fr}.detail-hero{height:44vh}
}


/* === Full-screen Presentation Mode === */
html,body{width:100%;height:100%;overflow:hidden}
body{background:#141014}
.presentation-shell{position:fixed;inset:0;overflow:hidden;background:#151115}
.stage{
  position:absolute;inset:0;
  opacity:0;visibility:hidden;pointer-events:none;
  transform:translate3d(6%,0,0) scale(.985);
  transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .85s cubic-bezier(.16,1,.3,1),visibility .85s;
  color:white;
}
.stage.active{opacity:1;visibility:visible;pointer-events:auto;transform:none;z-index:2}
.stage.leaving-left{transform:translate3d(-5%,0,0) scale(.985);opacity:0}
.stage-bg{position:absolute;inset:0;background-size:cover;background-position:center}
.home-bg{
  background:
    radial-gradient(circle at 76% 42%,rgba(181,152,128,.55),transparent 24%),
    linear-gradient(130deg,#5a4a48 0%,#34282f 42%,#171316 100%);
}
.projects-bg{
  background:
    radial-gradient(circle at 18% 20%,rgba(150,111,138,.20),transparent 28%),
    linear-gradient(135deg,#271d27,#151115 65%);
}
.models-bg{
  background:
    radial-gradient(circle at 50% 48%,rgba(112,75,105,.22),transparent 32%),
    linear-gradient(160deg,#1c151c,#0e0b0e);
}
.stage-overlay{position:absolute;inset:0;background:linear-gradient(100deg,rgba(14,10,14,.86),rgba(24,15,24,.45),rgba(10,8,10,.14))}
.stage-overlay.soft{background:linear-gradient(180deg,rgba(12,9,12,.28),rgba(12,9,12,.76))}
.stage-content{position:relative;z-index:2;height:100%;padding:110px 6vw 55px;display:flex;flex-direction:column;justify-content:center}
.home-content{max-width:850px}
.home-content h1{font-size:clamp(60px,8vw,118px);line-height:.9;margin:22px 0 28px;font-weight:900}
.home-content h1 span{color:#dccbac}
.home-content p{max-width:640px;font-size:20px;line-height:1.85;color:rgba(255,255,255,.70)}
.stage-actions{display:flex;gap:12px;margin-top:28px}
.stage-index{position:absolute;z-index:3;bottom:28px;right:6vw;font-size:12px;letter-spacing:2px;color:rgba(255,255,255,.42)}
.projects-content,.models-content{justify-content:flex-start;padding-top:115px}
.section-head.compact{margin-bottom:24px}
.section-head.compact h2{font-size:clamp(38px,4.5vw,62px)}
.presentation-grid{height:calc(100vh - 250px);min-height:420px}
.presentation-grid .project-card{height:100%;min-height:0}
.models-title{margin-bottom:0}
#stageModels .carousel{height:430px}
#stageModels .card3d{top:22px;height:355px}
#stageModels .model-info{padding-top:0}
.presentation-nav{
  position:fixed;z-index:30;bottom:27px;left:50%;transform:translateX(-50%);
  display:flex;gap:10px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);
  padding:9px 12px;border-radius:999px;backdrop-filter:blur(12px)
}
.presentation-nav button{width:8px;height:8px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.35);transition:.3s}
.presentation-nav button.active{width:26px;border-radius:999px;background:var(--gold)}
.slide-arrow{
  position:fixed;z-index:29;top:50%;transform:translateY(-50%);
  width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);color:white;font-size:30px;backdrop-filter:blur(10px)
}
.slide-prev{right:24px}.slide-next{left:24px}
.generic-popup{
  position:fixed;inset:0;z-index:450;background:rgba(9,7,9,.68);backdrop-filter:blur(12px);
  display:flex;align-items:center;justify-content:center;padding:4vw;
  opacity:0;visibility:hidden;pointer-events:none;transition:.35s
}
.generic-popup.open{opacity:1;visibility:visible;pointer-events:auto}
.popup-card{
  width:min(1180px,92vw);height:min(760px,86vh);background:#eee9e2;border-radius:28px;
  overflow:hidden;position:relative;box-shadow:0 40px 120px rgba(0,0,0,.5);
  transform:translateY(20px) scale(.98);transition:.45s cubic-bezier(.16,1,.3,1)
}
.generic-popup.open .popup-card{transform:none}
.close-popup{
  position:absolute;top:18px;left:18px;z-index:10;width:44px;height:44px;border-radius:50%;
  border:0;background:rgba(255,255,255,.85);font-size:28px
}
.popup-project-view{height:100%;display:grid;grid-template-columns:1.05fr .95fr}
.popup-project-visual{position:relative;background:linear-gradient(135deg,#b6aaa0,#6c6260 45%,#2d2729)}
.popup-project-copy{padding:70px 54px;display:flex;flex-direction:column;justify-content:center}
.popup-project-copy h2{font-size:62px;margin:10px 0}
.popup-model-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:24px}
.popup-model-list button{border:0;background:#ded5d1;padding:16px;border-radius:14px;font-weight:800}
.popup-model-list button:hover{background:#241a24;color:white}
.popup-experience{height:100%;display:grid;grid-template-columns:1.15fr .85fr}
.popup-experience .media{background:linear-gradient(135deg,#aaa096,#67605d,#302b2d);position:relative}
.popup-experience .copy{padding:70px 50px;display:flex;flex-direction:column;justify-content:center}
.popup-experience h2{font-size:54px;margin:8px 0 18px}
.popup-experience ul{list-style:none;padding:0}.popup-experience li{padding:11px 0;border-top:1px solid #d3c8c4}
.popup-contact{height:100%;padding:80px;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(135deg,#3d213d,#261725);color:white}
.popup-contact h2{font-size:64px;margin:12px 0}
.popup-contact .contact-actions{margin-top:24px}
.model-modal{z-index:470;inset:3.5vw;border-radius:28px;height:auto;transform:translateY(110%)}
.model-modal.open{transform:none}
.model-modal .detail-hero{height:42vh}
.model-modal .gallery-strip{padding-bottom:30px}
.admin-panel{z-index:500}
@media(max-width:900px){
  .stage-content{padding:90px 5vw 48px}
  .home-content h1{font-size:58px}
  .presentation-grid{grid-template-columns:1fr;height:calc(100vh - 220px)}
  .presentation-grid .project-card:nth-child(2){display:none}
  .popup-project-view,.popup-experience{grid-template-columns:1fr}
  .popup-project-visual,.popup-experience .media{min-height:34vh}
  .popup-project-copy,.popup-experience .copy{padding:34px 24px}
  .popup-project-copy h2,.popup-contact h2{font-size:42px}
  .popup-model-list{grid-template-columns:1fr 1fr}
  .slide-arrow{display:none}
  #stageModels .carousel{height:390px}
  #stageModels .card3d{height:320px}
  .model-modal{inset:2vw}
}


/* === Start Screen: hero + 3D gallery === */
.home-layout{
  display:grid;
  grid-template-columns:.92fr 1.08fr;
  gap:2.5vw;
  align-items:center;
  min-height:100%;
}
.home-copy{max-width:640px}
.home-gallery{
  position:relative;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-top:22px;
}
.home-gallery-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:8px;
}
.home-gallery-head h2{
  margin:8px 0 0;
  font-size:clamp(34px,3.8vw,56px);
}
.home-gallery-head p{
  max-width:290px;
  line-height:1.8;
  color:rgba(255,255,255,.58);
  margin:0;
}
.home-carousel-wrap{margin-top:0}
#stageHome .carousel{
  height:420px;
  perspective:1900px;
}
#stageHome .card3d{
  top:18px;
  width:min(50vw,680px);
  height:335px;
}
#stageHome .card3d .label h3{
  font-size:38px;
}
#stageHome .model-info{
  padding:2px 0 0;
  justify-content:flex-start;
  gap:26px;
  flex-wrap:wrap;
}
#stageHome .model-info .stat{
  min-width:120px;
}
#stageHome .nav-arrow.prev{right:-8px}
#stageHome .nav-arrow.next{left:-8px}

.overview-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
  margin-top:18px;
}
.overview-card{
  min-height:180px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04);
  border-radius:24px;
  color:white;
  text-align:right;
  padding:28px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  backdrop-filter:blur(10px);
  transition:transform .35s ease, background .35s ease, border-color .35s ease;
}
.overview-card:hover{
  transform:translateY(-4px);
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.18);
}
.overview-card strong{
  font-size:28px;
}
.overview-card span{
  color:rgba(255,255,255,.62);
  line-height:1.8;
}

@media(max-width:1100px){
  .home-layout{grid-template-columns:1fr;gap:8px}
  .home-copy{max-width:none}
  .home-gallery{padding-top:0}
  .home-gallery-head{display:block}
  .home-gallery-head p{max-width:none;margin-top:10px}
  #stageHome .carousel{height:390px}
  #stageHome .card3d{width:76vw;height:315px}
}

@media(max-width:900px){
  .home-layout{gap:4px}
  .home-copy h1{margin-bottom:18px}
  .home-copy p{font-size:17px}
  #stageHome .carousel{height:360px}
  #stageHome .card3d{height:290px}
  #stageHome .model-info{gap:16px}
  .overview-grid{grid-template-columns:1fr}
}


/* === New Start Screen: 3D Gallery First === */
.start-gallery-content{
  justify-content:space-between;
  padding-top:105px;
  padding-bottom:52px;
}
.start-gallery-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:40px;
}
.start-gallery-note{
  max-width:360px;
  padding-top:18px;
}
.start-gallery-note p{
  margin:0;
  color:rgba(255,255,255,.56);
  line-height:2;
  font-size:15px;
}
.start-gallery-title{
  text-align:right;
}
.start-gallery-title h1{
  margin:14px 0 0;
  font-size:clamp(60px,7vw,92px);
  line-height:.98;
  font-weight:900;
  color:white;
}
.start-carousel-wrap{
  margin-top:-10px;
}
#stageHome .carousel{
  height:440px;
  perspective:1900px;
  perspective-origin:50% 46%;
}
#stageHome .card3d{
  top:22px;
  width:min(54vw,760px);
  height:350px;
}
#stageHome .card3d .label h3{
  font-size:52px;
}
#stageHome .card3d .label span{
  font-size:13px;
}
.start-model-info{
  justify-content:center;
  gap:42px;
  padding:4px 0 0;
  flex-wrap:wrap;
}
.start-model-info .stat{
  text-align:center;
  min-width:105px;
}
.start-model-info .primary{
  order:-1;
}
#stageHome .nav-arrow.prev{right:0}
#stageHome .nav-arrow.next{left:0}

/* Slightly darker, cleaner first screen */
#stageHome .stage-overlay{
  background:
    radial-gradient(circle at 50% 55%, rgba(135,93,126,.10), transparent 26%),
    linear-gradient(180deg, rgba(10,8,12,.36), rgba(10,8,12,.62));
}

@media(max-width:1100px){
  .start-gallery-top{
    gap:20px;
  }
  .start-gallery-title h1{
    font-size:54px;
  }
  #stageHome .card3d{
    width:min(74vw,680px);
    height:320px;
  }
}

@media(max-width:900px){
  .start-gallery-content{
    padding-top:90px;
    padding-bottom:44px;
  }
  .start-gallery-top{
    display:block;
  }
  .start-gallery-note{
    max-width:none;
    padding-top:0;
    margin-bottom:14px;
  }
  .start-gallery-title h1{
    font-size:48px;
  }
  #stageHome .carousel{
    height:360px;
  }
  #stageHome .card3d{
    width:76vw;
    height:290px;
  }
  #stageHome .card3d .label h3{
    font-size:40px;
  }
  .start-model-info{
    gap:18px;
  }
}


/* === v7 continuous carousel motion === */
.card3d{
  transition:
    transform 980ms cubic-bezier(.18,.84,.22,1),
    opacity 820ms cubic-bezier(.18,.84,.22,1),
    filter 980ms cubic-bezier(.18,.84,.22,1),
    box-shadow 980ms cubic-bezier(.18,.84,.22,1);
}
.carousel.dragging .card3d{
  transition:none !important;
}
.card3d.hidden{
  pointer-events:none;
}


/* === v8 collision-safe 3D gallery === */
#stageHome .carousel{
  perspective:2200px;
}
#stageHome .card3d{
  width:min(49vw,700px);
}
.card3d{
  transform-origin:center center;
}


/* === v9 unified motion engine ===
   All transforms now come from JS, so resting and dragging use identical coordinates. */
.card3d,
.card3d[data-pos="0"],
.card3d[data-pos="-1"],
.card3d[data-pos="1"],
.card3d[data-pos="-2"],
.card3d[data-pos="2"],
.card3d.hidden{
  will-change:transform,opacity,filter;
}
.carousel.no-transition .card3d{
  transition:none !important;
}
.carousel.dragging .card3d{
  transition:none !important;
}
.card3d{
  transition:
    transform 900ms cubic-bezier(.20,.82,.22,1),
    opacity 760ms cubic-bezier(.20,.82,.22,1),
    filter 820ms cubic-bezier(.20,.82,.22,1),
    box-shadow 820ms cubic-bezier(.20,.82,.22,1);
}


/* === v10 Full RTL interface + MADC logo === */
html, body{
  direction:rtl;
  text-align:right;
}
body, button, input, select, textarea{
  direction:rtl;
}
input, select, textarea{
  text-align:right;
}

/* Header is explicitly composed RTL: logo right, nav center, dashboard left */
.topbar{
  direction:rtl;
  display:grid;
  grid-template-columns:auto 1fr auto;
  grid-template-areas:"brand nav admin";
  align-items:center;
  column-gap:36px;
}
.brand{
  grid-area:brand;
  justify-self:start;
  display:flex;
  align-items:center;
  height:64px;
  width:116px;
  overflow:visible;
}
.brand-logo{
  display:block;
  width:100%;
  height:58px;
  object-fit:contain;
  object-position:right center;
}
.logo-on-dark{
  filter:none;
}
.topbar nav{
  grid-area:nav;
  justify-self:center;
  direction:rtl;
  display:flex;
  flex-direction:row;
  align-items:center;
}
.topbar #openAdmin{
  grid-area:admin;
  justify-self:end;
}

/* Arabic navigation reads right-to-left */
.topbar nav a{
  text-align:right;
}

/* Start screen: title on the right, instructions on the left */
.start-gallery-top{
  direction:rtl;
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-areas:"title note";
  align-items:start;
}
.start-gallery-title{
  grid-area:title;
  justify-self:start;
  text-align:right;
}
.start-gallery-note{
  grid-area:note;
  justify-self:end;
  text-align:right;
}

/* Sections and cards */
.section-head,
.detail-content,
.popup-project-view,
.popup-experience,
.contact,
.admin-toolbar,
.admin-card{
  direction:rtl;
}
.project-copy,
.popup-project-copy,
.popup-experience .copy,
.popup-contact,
.overview-card,
.admin-layout aside button{
  text-align:right;
}

/* Admin layout: sidebar is on the right in Arabic */
.admin-layout{
  direction:rtl;
  grid-template-columns:240px 1fr;
}
.admin-layout aside{
  grid-column:1;
  border-left:1px solid #e6dfe0;
  border-right:0;
}
.admin-main{
  grid-column:2;
}
.admin-branding{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:18px;
  direction:rtl;
}
.admin-logo{
  width:72px;
  height:58px;
  object-fit:contain;
}

/* Logical popup and panel controls */
.detail-tabs{
  direction:rtl;
}
.form-grid{
  direction:rtl;
}
.toast{
  right:auto;
  left:30px;
}

/* Presentation transitions follow RTL reading direction */
.stage{
  transform:translate3d(-6%,0,0) scale(.985);
}
.stage.leaving-left{
  transform:translate3d(5%,0,0) scale(.985);
}

/* Logical page arrows: previous on right, next on left */
.slide-prev{right:24px;left:auto}
.slide-next{left:24px;right:auto}

/* Main carousel arrows remain physical left/right but labels follow RTL */
#stageHome .nav-arrow.prev{right:0;left:auto}
#stageHome .nav-arrow.next{left:0;right:auto}

/* Model info flows naturally right-to-left */
.start-model-info,
.model-info{
  direction:rtl;
}
.model-info button{
  margin-right:0;
  margin-left:20px;
}

/* Light-background logo utility for future popups/pages */
.logo-on-light{
  content:url("assets/madc-logo-original.png");
}

@media(max-width:900px){
  .topbar{
    grid-template-columns:auto 1fr auto;
    column-gap:12px;
  }
  .brand{
    width:88px;
    height:54px;
  }
  .brand-logo{
    height:50px;
  }
  .start-gallery-top{
    grid-template-columns:1fr;
    grid-template-areas:"title" "note";
  }
  .start-gallery-note{
    justify-self:start;
  }
}


/* === v11 Larger MADC header logo === */
.topbar{
  min-height:94px;
  padding-top:8px;
  padding-bottom:8px;
}
.brand{
  width:170px;
  height:78px;
}
.brand-logo{
  width:100%;
  height:76px;
  object-fit:contain;
  object-position:right center;
}
@media(max-width:1100px){
  .brand{
    width:145px;
    height:70px;
  }
  .brand-logo{
    height:68px;
  }
}
@media(max-width:900px){
  .brand{
    width:118px;
    height:60px;
  }
  .brand-logo{
    height:58px;
  }
}


/* === v12 Distinguish the two arrow pairs === */

/* 1) Carousel arrows: smaller, subtle, ghosted circles */
.nav-arrow{
  width:52px;
  height:52px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.92);
  font-size:28px;
  backdrop-filter:blur(8px);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}
.nav-arrow:hover{
  transform:scale(1.05);
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.24);
}

/* 2) Presentation stage arrows: larger, capsule-like, more prominent */
.slide-arrow{
  width:62px;
  height:62px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.22);
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  color:#fff;
  font-size:34px;
  backdrop-filter:blur(14px);
  box-shadow:0 18px 40px rgba(0,0,0,.28);
}
.slide-arrow:hover{
  transform:translateY(-50%) scale(1.04);
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  border-color:rgba(255,255,255,.32);
}

/* Increase spatial separation so the two systems do not visually merge */
#stageHome .nav-arrow.prev{ right:88px; }
#stageHome .nav-arrow.next{ left:88px; }

.slide-prev{ right:18px; }
.slide-next{ left:18px; }

/* On mobile hide presentation arrows first and keep only carousel arrows */
@media(max-width:900px){
  .slide-arrow{
    display:none;
  }
  #stageHome .nav-arrow.prev{ right:12px; }
  #stageHome .nav-arrow.next{ left:12px; }
}

