:root {
  
    --navy: #0F172A;
    --navy-d: #020617;
    --gold: #C5A059;
    --gold-l: #E2C48C;
    --cream: #FAF9F6;
    --ink: #1E293B;
    --muted: #64748B;
    --line: #E2E8F0;
    --radius: 10px;
    --maxw: 1120px;
    --font-size: 16px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html,body{overflow-x:hidden;}
body{
  margin:0; background:var(--cream); color:var(--ink);
  font-family:"Cairo","Tajawal",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  line-height:1.8;
}
html[dir="ltr"] body{ font-family:"Inter","Segoe UI",system-ui,-apple-system,Arial,sans-serif; }
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
.container{max-width:var(--maxw); margin:0 auto; padding:0 20px;}
section{padding:64px 0;}
.section-alt{background:#fff;}
h1,h2,h3,h4{font-weight:800; color:var(--navy); margin:0 0 14px;}
h1{font-size:clamp(28px,4.5vw,44px); line-height:1.3;}
h2{font-size:clamp(22px,3vw,30px);}
h3{font-size:19px;}
p{margin:0 0 12px; color:var(--ink);}
.muted{color:var(--muted);}
.eyebrow{
  display:inline-block; font-size:13px; font-weight:700; letter-spacing:.03em;
  color:var(--gold); background:rgba(176,141,62,.1); padding:5px 14px; border-radius:30px; margin-bottom:12px;
}
.btn{
  display:inline-flex; align-items:center; gap:8px; background:var(--navy); color:#fff;
  padding:12px 24px; border-radius:8px; font-weight:700; font-size:15px; border:1px solid var(--navy);
  transition:.2s;
}
.btn:hover{background:var(--navy-d);}
.btn.outline{background:transparent; color:var(--navy); border-color:var(--navy);}
.btn.outline:hover{background:var(--navy); color:#fff;}
.btn.gold{background:var(--gold); border-color:var(--gold); color:#fff;}
.btn.gold:hover{background:#96742f;}

/* ---------- Header ---------- */
header.site{
  position:sticky; top:0; z-index:50; background:rgba(250,247,241,.92); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.nav-wrap{display:flex; align-items:center; justify-content:space-between; padding:14px 0;}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; color:var(--navy); font-size:17px;}
.brand .mark{
  width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg,var(--navy),var(--navy-d));
  color:var(--gold-l); display:flex; align-items:center; justify-content:center; font-size:19px; font-weight:800;
}
nav.main{display:flex; align-items:center; gap:28px;}
nav.main a{font-weight:600; font-size:15px; color:var(--ink); position:relative; padding:4px 0;}
nav.main a.active, nav.main a:hover{color:var(--navy);}
    nav.main a::after {
        content: "";
        position: absolute;
        bottom: -4px;
        right: 0;
        left: 0;
        height: 2px;
        background: var(--gold);
        transform: scaleX(0);
        transition: transform .25s ease;
    }

    nav.main a.active::after {
        transform: scaleX(1);
    }

    nav.main a:hover::after {
        transform: scaleX(1);
    }.lang-switch{
  display:flex; align-items:center; gap:6px; font-weight:700; font-size:14px;
  border:1px solid var(--line); border-radius:30px; padding:6px 14px; background:#fff;
}
.lang-switch:hover{border-color:var(--gold);}
.nav-toggle{display:none; background:none; border:0; font-size:26px; color:var(--navy); cursor:pointer;}

@media(max-width:860px){
  nav.main{
    position:fixed; inset-inline-start:0; top:70px; width:100%; background:#fff; flex-direction:column;
    align-items:flex-start; gap:0; padding:10px 20px 20px; border-bottom:1px solid var(--line);
    transform:translateY(-130%); transition:.25s; box-shadow:0 10px 24px rgba(0,0,0,.08);
  }
  nav.main.open{transform:translateY(0);}
  nav.main a{width:100%; padding:12px 0; border-bottom:1px solid var(--line);}
  .nav-toggle{display:block;}
  .lang-switch{margin-top:10px;}
}

/* ---------- Hero ---------- */
.hero{
  background:linear-gradient(160deg,var(--navy) 0%, var(--navy-d) 100%);
  color:#fff; padding:80px 0 70px; position:relative; overflow:hidden;
}
.hero::before{
  content:""; position:absolute; inset:0; opacity:.12; background-image:
    radial-gradient(circle at 15% 25%, var(--gold-l) 0, transparent 45%),
    radial-gradient(circle at 85% 75%, var(--gold-l) 0, transparent 40%);
}
.hero-grid{position:relative; display:grid; grid-template-columns:1.2fr .8fr; gap:40px; align-items:center;}
@media(max-width:860px){.hero-grid{grid-template-columns:1fr;}}
.hero h1{color:#fff;}
.hero .lead{color:#d7dceb; font-size:18px; max-width:46ch;}
.hero-cta{display:flex; gap:14px; margin-top:22px; flex-wrap:wrap;}
.hero-figure {
    aspect-ratio: 4/5;
    border-radius: 16px;
    background: transparent;
    border: 0px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

    .hero-figure img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 12px;
        border: 1.5px solid rgba(255, 255, 255, 0.4);
        transition: transform .3s ease, box-shadow .3s ease;
    }

    .hero-figure:hover {
        transform: translateY(-6px) scale(1.02); 
        border-color: rgba(255, 255, 255, 0.8); 
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    }
.stat-row{display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-top:46px; position:relative;}
@media(max-width:700px){.stat-row{grid-template-columns:repeat(2,1fr);}}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    cursor: pointer;
}

    .stat:hover {
        transform: translateY(-4px);
        background: rgba(255,255,255,.1);
        border-color: var(--gold);
    }
.stat b{display:block; font-size:28px; color:var(--gold-l);}
.stat span{font-size:13px; color:#cfd5e4;}

/* ---------- Timeline ---------- */
.timeline{position:relative; margin-top:30px; padding-inline-start:26px; border-inline-start:2px solid var(--line);}
.t-item{position:relative; padding-bottom:28px;}
.t-item:last-child{padding-bottom:0;}
.t-item::before{
  content:""; position:absolute; inset-inline-start:-33px; top:2px; width:14px; height:14px;
  border-radius:50%; background:var(--gold); border:3px solid var(--cream); box-shadow:0 0 0 2px var(--gold);
}
.t-item b.y{color:var(--gold); font-size:14px; display:block; margin-bottom:3px;}

/* ---------- Cards / grids ---------- */
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:24px;}
.grid-2{display:grid; grid-template-columns:repeat(2,1fr); gap:24px;}
@media(max-width:860px){.grid-3{grid-template-columns:1fr;} .grid-2{grid-template-columns:1fr;}}
.card{background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:26px; transition:.2s;}
.card:hover{box-shadow:0 10px 28px rgba(22,42,74,.08); transform:translateY(-3px);}
.card .ic{font-size:30px; margin-bottom:12px;}

/* ---------- Project category tabs ---------- */
.tabs{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:34px;}
.tab-btn {
    padding: 13px 23px; /* زيادة حجم الزر قليلاً */
    font-size: 15px; /* تكبير الخط داخل الزر */
    border-radius: 30px;
    border: 2px solid var(--navy);
    background-color: #ffffff;
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease-in-out; /* حركة سلسة عند تفاعل الماوس */
}

    /* تأثير مرور الماوس (Hover) */
    .tab-btn:hover {
        background-color: var(--navy);
        color: #ffffff;
    }

    /* الحالة النشطة أو وأنت في الصفحة/القسم المفعل (Active) */
    .tab-btn.active {
        background-color: var(--navy);
        color: #ffffff;
        border-color: var(--navy);
    }
.cat-panel{display:none;}
.cat-panel.active{display:block;}
.cat-intro{max-width:70ch; margin-bottom:30px;}
.group-title{
  display:flex; align-items:center; gap:10px; margin:36px 0 18px; font-size:17px; font-weight:800; color:var(--navy);
}
.group-title::before{content:""; width:28px; height:3px; background:var(--gold); border-radius:3px;}
.piece-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:22px;}
.piece{background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;}
.piece .imgs{display:grid; grid-template-columns:1fr 1fr;}
.piece .imgs img{height:150px; object-fit:cover; width:100%; cursor:zoom-in;}
.piece .pbody{padding:16px 18px;}
.piece .dims{font-size:12.5px; color:var(--gold); font-weight:700; margin-bottom:6px;}
.piece p{font-size:14px; color:var(--muted); margin:0;}

/* ---------- Research list ---------- */
.paper{
  display:grid; grid-template-columns:50px 1fr; gap:16px; padding:20px 0; border-bottom:1px solid var(--line);
}
.paper .num{
  width:42px; height:42px; border-radius:50%; background:var(--navy); color:var(--gold-l); font-weight:800;
  display:flex; align-items:center; justify-content:center; font-size:14px;
}
.paper h4{margin:0 0 6px; font-size:16px; color:var(--navy);}
.paper .venue{font-size:13.5px; color:var(--gold); font-weight:700;}
.paper .authors{font-size:13.5px; color:var(--muted); margin-top:3px;}

/* ---------- Contact ---------- */
.contact-grid{display:grid; grid-template-columns:.9fr 1.1fr; gap:40px;}
@media(max-width:860px){.contact-grid{grid-template-columns:1fr;}}
.info-line{display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--line);}
.info-line .ic{
  width:44px; height:44px; border-radius:10px; background:rgba(176,141,62,.12); color:var(--gold);
  display:flex; align-items:center; justify-content:center; font-size:19px; flex:0 0 auto;
}
form.contact{display:flex; flex-direction:column; gap:14px;}
.field{display:flex; flex-direction:column; gap:6px;}
.field label{font-size:13.5px; font-weight:700; color:var(--navy);}
.field input, .field textarea{
  border:1px solid var(--line); border-radius:8px; padding:12px 14px; font-family:inherit; font-size:14.5px;
  background:#fff;
}
.field textarea{min-height:120px; resize:vertical;}
.note-box{
  background:#fff; border:1px solid var(--line); border-right:4px solid var(--gold); border-radius:8px;
  padding:14px 18px; font-size:13.5px; color:var(--muted); margin-top:16px;
}
html[dir="ltr"] .note-box{border-right:1px solid var(--line); border-left:4px solid var(--gold);}

/* ---------- Footer ---------- */
footer.site{background:var(--navy-d); color:#cfd5e4; padding:46px 0 24px; margin-top:60px;}
.foot-grid{display:flex; justify-content:space-between; gap:30px; flex-wrap:wrap;}
footer.site h4{color:#fff; font-size:15px; margin-bottom:10px;}
footer.site a{color:#cfd5e4; font-size:14px; display:block; margin-bottom:8px;}
footer.site a:hover{color:var(--gold-l);}
.foot-bottom{border-top:1px solid rgba(255,255,255,.12); margin-top:28px; padding-top:18px; font-size:13px; color:#8b93a8; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;}

/* ---------- Lightbox ---------- */
.lightbox{position:fixed; inset:0; background:rgba(13,26,48,.92); display:none; align-items:center; justify-content:center; z-index:200; padding:30px;}
.lightbox.open{display:flex;}
.lightbox img{max-width:90vw; max-height:85vh; border-radius:8px;}
.lightbox .close{position:absolute; top:22px; inset-inline-end:28px; color:#fff; font-size:32px; cursor:pointer; background:none; border:0;}

/* ---------- Page header (inner pages) ---------- */
.page-head{background:linear-gradient(160deg,var(--navy),var(--navy-d)); color:#fff; padding:56px 0;}
.page-head .eyebrow{background:rgba(255,255,255,.12); color:var(--gold-l);}
.page-head h1{color:#fff; margin-bottom:8px;}
.page-head p{color:#cfd5e4; max-width:60ch;}
.breadcrumb{font-size:13px; color:#9aa3bb; margin-bottom:10px;}
.breadcrumb a{color:#cfd5e4;}

.skip-link{position:absolute; inset-inline-start:0; top:-60px; background:#fff; padding:10px 16px; z-index:999; transition:top .15s;}
.skip-link:focus{top:10px;}

.hero .btn-primary,
.hero a[href*="projects"],
.hero-btns a:first-child {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: inline-flex !important;
}

    .hero .btn-primary:hover,
    .hero a[href*="projects"]:hover,
    .hero-btns a:first-child:hover {
        transform: translateY(-5px) scale(1.02) !important;
        box-shadow: 0 10px 20px rgba(197, 160, 89, 0.4) !important;
    }

.hero .btn-secondary,
.hero a[href*="contact"],
.hero-btns a:last-child {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: inline-flex !important;
}

    .hero .btn-secondary:hover,
    .hero a[href*="contact"]:hover,
    .hero-btns a:last-child:hover {
        transform: translateY(-5px) !important;
        background-color: rgba(197, 160, 89, 0.15) !important;
        border-color: #C5A059 !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
    }

footer a,
.footer a {
    transform: none !important;
    box-shadow: none !important;
}

/* ===== Step 2 additions: galleries, lab examples, training, research, profile links ===== */
.piece .more-btn{margin-top:10px;background:none;border:1px solid var(--gold);color:var(--gold);border-radius:30px;padding:6px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:.2s}
.piece .more-btn:hover{background:var(--gold);color:#fff}
.lab-grid{grid-template-columns:repeat(auto-fill,minmax(440px,1fr))}
.piece.lab .imgs img{height:270px;object-fit:contain;background:#fff;padding:4px}
.piece.wide{grid-column:1/-1}
.piece .imgs.four{grid-template-columns:repeat(4,1fr)}
.piece .imgs.four img{height:200px}
@media(max-width:700px){.piece .imgs.four{grid-template-columns:1fr 1fr}.lab-grid{grid-template-columns:1fr}.piece.lab .imgs img{height:190px}}

.video-wrap{max-width:760px;margin:6px 0 10px}
.video-wrap .vtitle{font-size:17px;margin-bottom:10px}
.video-wrap video{width:100%;border-radius:12px;background:#000;box-shadow:0 10px 28px rgba(22,42,74,.18)}
.course-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
@media(max-width:860px){.course-grid{grid-template-columns:1fr}}
.course-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px}
.course-card .aud{font-weight:800;color:var(--navy);font-size:14.5px;line-height:1.7;margin-bottom:10px;padding-bottom:10px;border-bottom:1px dashed var(--line)}
.course-card ul{list-style:none;margin:0;padding:0}
.course-card li{position:relative;padding-inline-start:22px;margin-bottom:6px;font-size:14.5px}
.course-card li::before{content:"";position:absolute;inset-inline-start:0;top:.7em;width:8px;height:8px;border-radius:50%;background:var(--gold)}

.profiles-box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;margin-bottom:26px}
.plinks{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.plinks .btn{padding:9px 18px;font-size:14px}
.contact-profiles{padding:40px 0}
.rtools{display:flex;flex-wrap:wrap;gap:14px;align-items:center;justify-content:space-between;margin-bottom:8px}
.rtabs{display:flex;flex-wrap:wrap;gap:10px}
.rtab-btn{padding:10px 18px;border-radius:30px;border:1px solid var(--line);background:#fff;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer;color:var(--ink)}
.rtab-btn .cnt{display:inline-block;min-width:24px;padding:0 7px;margin-inline-start:6px;border-radius:20px;background:rgba(176,141,62,.15);color:var(--gold);font-size:12.5px}
.rtab-btn.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.rtab-btn.active .cnt{background:rgba(255,255,255,.18);color:#fff}
.rsearch{flex:1;min-width:220px;max-width:340px;border:1px solid var(--line);border-radius:30px;padding:10px 18px;font:inherit;font-size:14.5px;background:#fff}
.rnote{font-size:12.5px;margin:6px 0 18px}
.rpanel{display:none;max-width:860px}
.rpanel.active{display:block}
.paper h4 a:hover,.book h3 a:hover{color:var(--gold)}
.rtag{margin-top:6px}
.rlink{font-size:12.5px;font-weight:700;color:var(--gold)}
.rlink:hover{text-decoration:underline}
.pill{display:inline-block;font-size:11.5px;font-weight:700;padding:1px 9px;border-radius:20px;background:rgba(176,141,62,.15);color:var(--gold);vertical-align:middle}
.book-grid{display:grid;grid-template-columns:1fr;gap:22px}
.book{display:grid;grid-template-columns:150px 1fr;gap:22px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.book .cover img{width:150px;height:auto;border-radius:6px;box-shadow:0 8px 20px rgba(22,42,74,.18);transition:transform .25s}
.book .cover:hover img{transform:translateY(-4px) scale(1.03)}
.book h3{font-size:17px;line-height:1.6;margin-bottom:8px}
.book .cit{font-size:13px;color:var(--muted);line-height:1.8;margin:0 0 6px;word-break:break-word}
@media(max-width:560px){.book{grid-template-columns:96px 1fr;gap:14px}.book .cover img{width:96px}}
.foot-profiles h4{margin-bottom:10px}

.rtab-btn:hover {
    background-color: #0f172a; 
    color: #ffffff; 
    border-color: #0f172a; 
}

    .rtab-btn:hover .cnt {
        background-color: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

/* gallery lightbox */
.lightbox .lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:26px;cursor:pointer;display:none}
.lightbox .lb-nav:hover{background:rgba(255,255,255,.3)}
.lightbox.multi .lb-nav{display:block}
.lightbox .lb-prev{left:18px}.lightbox .lb-next{right:18px}
.lightbox .lb-count{position:absolute;bottom:20px;left:0;right:0;text-align:center;color:#fff;font-size:14px;direction:ltr}

main:has(#panel-training.active) #stages {
    display: none
}