@font-face{
  font-family:"Khalaad";
  src:url("assets/khalaad-al-arabeh.ttf") format("truetype");
  font-weight:400; font-style:normal; font-display:swap;
}
:root{
  --navy:#2a2d4a;
  --navy-2:#3e425e;
  --stone:#c1bca8;
  --stone-l:#e9e6db;
  --paper:#f4f5f8;
  --white:#fff;
  --ink:#1c1e33;
  --muted:#5d607a;
  --line:rgba(42,45,74,.16);
  --wa:#1d9f55;
  --wrap:1180px;
  --font:"Khalaad","Readex Pro","Segoe UI",Tahoma,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:96px}
body{font-family:var(--font);font-weight:400;font-synthesis:none;background:var(--paper);color:var(--ink);line-height:1.95;font-size:17px;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-weight:400;line-height:1.35}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;cursor:pointer;background:none;border:0}
:focus-visible{outline:3px solid var(--stone);outline-offset:3px}
.wrap{width:min(var(--wrap),100% - 40px);margin-inline:auto}

/* ───── الشريط العلوي ───── */
.top{position:sticky;top:0;z-index:50;background:var(--white);border-bottom:1px solid var(--line)}
.top-in{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:84px}
.brand img{height:72px;width:auto}
.nav{display:flex;gap:6px;align-items:center}
.nav a{padding:8px 16px;font-size:16px;color:var(--navy-2);border-radius:2px;transition:background .2s}
.nav a:hover{background:var(--stone-l)}
.nav .nav-cta{background:var(--navy);color:var(--white);margin-inline-start:8px}
.nav .nav-cta:hover{background:var(--navy-2)}

/* ───── الأزرار ───── */
.btn{display:inline-flex;align-items:center;gap:10px;padding:13px 28px;border-radius:2px;font-size:17px;line-height:1.6;transition:background .2s,color .2s,transform .2s}
.btn-stone{background:var(--stone);color:var(--navy)}
.btn-stone:hover{background:var(--white)}
.btn-line{border:1px solid rgba(255,255,255,.45);color:var(--white)}
.btn-line:hover{background:rgba(255,255,255,.1)}
.btn-navy{background:var(--navy);color:var(--white)}
.btn-navy:hover{background:var(--navy-2)}
.btn-wa{background:var(--wa);color:var(--white);padding:16px 34px;font-size:19px}
.btn-wa:hover{background:#178a49}
.btn svg{width:22px;height:22px;flex:none}

/* ───── البطل ───── */

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            rgba(62, 66, 94, 0.82),
            rgba(62, 66, 94, 0.82)
        ),
        url('/frontend/assets/img/banner.jpg') center center / cover no-repeat;
}
.hero-in{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:center;min-height:calc(100vh - 84px);max-height:760px;padding-block:70px}
.hero h1{font-size:clamp(2.3rem,5.2vw,4.3rem);line-height:1.4;max-width:14ch}
.hero p{margin-top:26px;max-width:46ch;color:#d5d6e2;font-size:1.12rem}
.hero-actions{margin-top:38px;display:flex;flex-wrap:wrap;gap:14px}
.hero-art{position:absolute;inset-block:-8%;inset-inline-end:-6%;width:min(62vw,760px);z-index:1;opacity:.95}
.hero-art svg{width:100%;height:100%}
.ring{stroke-dasharray:1900;stroke-dashoffset:1900;animation:draw 2.4s .15s cubic-bezier(.3,.6,.2,1) forwards}
@keyframes draw{to{stroke-dashoffset:0}}

/* ───── الأقسام العامة ───── */
.sec{padding-block:96px}
.sec-title{font-size:clamp(1.9rem,3.4vw,2.8rem);color:var(--navy)}
.sec-sub{margin-top:12px;color:var(--muted);max-width:56ch}
.on-dark .sec-title{color:var(--white)}
.on-dark .sec-sub{color:#cfd0de}

/* من نحن */
.about{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:72px;align-items:start}
.about-text p{margin-top:22px;max-width:58ch;color:#34364f}
.about-list{display:grid;gap:0}
.about-list div{padding:26px 0;border-top:1px solid var(--line)}
.about-list div:last-child{border-bottom:1px solid var(--line)}
.about-list dt{font-size:1.35rem;color:var(--navy)}
.about-list dd{margin-top:6px;color:var(--muted)}

/* إنجازاتنا */
.stats-band{background:var(--stone-l)}
.stats{display:grid;grid-template-columns:repeat(4,1fr);margin-top:48px}
.stat{padding:8px 28px;border-inline-start:1px solid rgba(42,45,74,.25)}
.stat:first-child{border-inline-start:0;padding-inline-start:0}
.stat b{display:block;font-weight:400;font-size:clamp(2.6rem,5vw,4rem);line-height:1.2;color:var(--navy)}
.stat span{color:var(--muted)}

/* الخريطة */
.map-sec{background:var(--white)}
.map-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,.9fr);gap:0;margin-top:44px;border:1px solid var(--line)}
#home-map{height:560px;background:var(--stone-l)}
.center-list{display:flex;flex-direction:column}
.center-row{display:block;padding:28px 30px;border-bottom:1px solid var(--line);transition:background .2s;flex:1}
.center-row:last-child{border-bottom:0}
.center-row:hover{background:var(--paper)}
.center-row h3{font-size:1.4rem;color:var(--navy)}
.center-row p{color:var(--muted);font-size:.98rem}
.center-row small{display:inline-block;margin-top:8px;font-size:.92rem;color:var(--navy-2);border-bottom:1px solid var(--stone)}
.pin span{display:block;width:34px;height:34px;border-radius:50%;background:var(--navy);border:7px solid var(--stone);box-shadow:0 0 0 3px var(--navy);transition:transform .2s}
.pin:hover span{transform:scale(1.2)}
.leaflet-tooltip.pin-label{font-family:var(--font);background:var(--navy);color:var(--white);border:0;border-radius:2px;padding:4px 12px;font-size:15px;box-shadow:none}
.leaflet-tooltip-top.pin-label::before{border-top-color:var(--navy)}
.leaflet-container{font-family:var(--font)}

/* عملاؤنا */
.client-rows{margin-top:44px;border-top:1px solid var(--line)}
.client-row{display:flex;justify-content:space-between;align-items:baseline;gap:24px;padding:22px 0;border-bottom:1px solid var(--line)}
.client-row h3{font-size:clamp(1.3rem,2.4vw,1.9rem);color:var(--navy)}
.client-row p{color:var(--muted);text-align:end;max-width:34ch;font-size:.98rem}
.client-names{margin-top:30px;color:var(--navy-2)}

/* هدفنا */
.goal{background:var(--navy);color:var(--white);position:relative;overflow:hidden}
.goal-in{position:relative;z-index:2;max-width:820px}
.goal blockquote{font-size:clamp(1.7rem,3.6vw,2.9rem);line-height:1.6}
.goal-points{margin-top:48px;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid rgba(255,255,255,.25)}
.goal-points div{padding:22px 24px 0;border-inline-start:1px solid rgba(255,255,255,.2)}
.goal-points div:first-child{border-inline-start:0;padding-inline-start:0}
.goal-points h4{font-size:1.2rem;color:var(--stone)}
.goal-points p{color:#cfd0de;font-size:.97rem;margin-top:4px}
.goal-art{position:absolute;inset-inline-start:-140px;bottom:-200px;width:520px;opacity:.5}

/* تواصل */
.contact{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center}
.contact-lines{display:grid}
.contact-lines div{padding:18px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px}
.contact-lines div:last-child{border-bottom:1px solid var(--line)}
.contact-lines span{color:var(--muted)}
.contact-lines b{font-weight:400;color:var(--navy)}
.contact .btn{margin-top:30px}

footer{background:var(--navy-2);color:#d5d6e2;padding-block:34px;font-size:.95rem}
.foot{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}

/* ───── صفحات المركز والمكتب ───── */
.crumbs{padding-block:22px;color:var(--muted);font-size:.95rem}
.crumbs a{color:var(--navy-2);border-bottom:1px solid var(--stone)}
.crumbs i{font-style:normal;margin-inline:8px}
.gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
    height: 460px;
    direction: rtl;
    align-items: stretch;
}
.gallery-main {
    position: relative;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: var(--stone-l);
    border-radius: 5px;
}
.gallery-main > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .25s ease;
}
.thumbs {
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    padding: 2px;
}

.thumb {
    width: 100%;
    min-height: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 4px;
    opacity: .65;
    transition: .25s ease;
    background: var(--white);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb:hover {
    opacity: 1;
}
.thumb[aria-current="true"] {
    opacity: 1;
    border-color: var(--navy);
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: rgba(42, 45, 74, .8);
    color: #fff;

    font-size: 25px;
    line-height: 1;

    transition: .2s ease;
}

.gallery-arrow:hover {
    background: var(--navy);
    transform: translateY(-50%) scale(1.08);
}

.gallery-prev {
    inset-inline-start: 16px;
}

.gallery-next {
    inset-inline-end: 16px;
}
.gallery-counter {
    position: absolute;
    bottom: 16px;
    inset-inline-end: 16px;
    z-index: 5;

    padding: 5px 14px;
    border-radius: 20px;

    background: rgba(42, 45, 74, .8);
    color: white;
    font-size: 14px;
    direction: ltr;
}
.page-head{margin-top:44px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:56px;align-items:start}
.page-head h1{font-size:clamp(2rem,4vw,3.2rem);color:var(--navy)}
.page-head .lead{margin-top:16px;color:#34364f;max-width:60ch}
.facts{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);background:var(--white)}
.fact{padding:20px 22px;border-inline-start:1px solid var(--line)}
.fact:first-child{border-inline-start:0}
.fact b{display:block;font-weight:400;font-size:2rem;line-height:1.3;color:var(--navy)}
.fact span{color:var(--muted);font-size:.95rem}
.fact em{font-style:normal;font-size:1rem;color:var(--muted)}
.block{margin-top:64px}
.block h2{font-size:1.9rem;color:var(--navy);margin-bottom:22px}
.addr{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:0;border:1px solid var(--line);background:var(--white)}
.addr-text{padding:32px}
.addr-text p{font-size:1.15rem;color:var(--navy)}
.addr-text a{display:inline-block;margin-top:18px;color:var(--navy-2);border-bottom:1px solid var(--stone)}
#mini-map{height:320px;background:var(--stone-l)}
.feat-list{display:flex;flex-wrap:wrap;gap:10px}
.feat-list li{list-style:none;display:flex;align-items:center;gap:10px;padding:10px 18px;background:var(--white);border:1px solid var(--line);border-radius:2px}
.feat-list svg{width:18px;height:18px;color:var(--navy-2);flex:none}
.filters{display:flex;gap:8px;margin-bottom:22px}
.filter{padding:8px 20px;border:1px solid var(--line);border-radius:2px;background:var(--white);transition:background .2s}
.filter[aria-pressed="true"]{background:var(--navy);color:var(--white);border-color:var(--navy)}
.offices{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.office{background:var(--white);border:1px solid var(--line);border-radius:2px;overflow:hidden;display:flex;flex-direction:column;transition:border-color .2s}
.office:hover{border-color:var(--navy)}
.office-img{position:relative;aspect-ratio:16/10;overflow:hidden}
.office-img img{width:100%;height:100%;object-fit:cover}
.badge{position:absolute;top:12px;inset-inline-start:12px;padding:2px 14px;font-size:.88rem;border-radius:2px;background:var(--white);color:var(--navy)}
.badge.free::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--wa);margin-inline-end:8px}
.badge.taken::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#a3a6b8;margin-inline-end:8px}
.office-body{padding:18px 20px 20px}
.office-body h3{font-size:1.25rem;color:var(--navy)}
.office-meta{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px 18px;color:var(--muted);font-size:.95rem}
.office-meta b{font-weight:400;color:var(--ink)}
.empty{padding:36px;text-align:center;color:var(--muted);border:1px dashed var(--line);grid-column:1/-1}
.cta-bar{margin-top:40px;display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.cta-note{color:var(--muted)}
.desc-cols p{max-width:68ch;color:#34364f}
.spacer{height:96px}

/* ───── الجوال ───── */
@media (max-width:960px){
  .hero-in{grid-template-columns:1fr;min-height:0;padding-block:64px 96px}
  .hero-art{width:110vw;inset-inline-end:-40vw;inset-block:auto -14%;opacity:.28}
  .about,.contact,.page-head{grid-template-columns:1fr;gap:36px}
  .stats{grid-template-columns:repeat(2,1fr);row-gap:28px}
  .stat:nth-child(3){border-inline-start:0;padding-inline-start:0}
  .map-grid{grid-template-columns:1fr}
  #home-map{height:420px}
  .center-row{border-top:0}
  .offices{grid-template-columns:repeat(2,1fr)}
  .addr{grid-template-columns:1fr}
  .goal-points{grid-template-columns:1fr}
  .goal-points div{border-inline-start:0;padding-inline-start:0;padding-bottom:14px}
}
@media (max-width:640px){
  body{font-size:16px}
  .top-in{flex-direction:column;align-items:flex-start;gap:0;padding-top:10px}
  .brand img{height:52px}
  .nav{width:100%;overflow-x:auto;padding-bottom:8px}
  .nav a{white-space:nowrap;padding:8px 12px}
  .sec{padding-block:64px}
    .gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 280px 85px;
        height: auto;
        gap: 10px;
    }

    .gallery-main {
        height: 280px;
    } 
    .thumbs {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        height: 85px;
    }

    .thumb {
        flex: 0 0 100px;
        height: 75px;
    }
        .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 21px;
    }
  .offices{grid-template-columns:1fr}
  .facts{grid-template-columns:1fr}
  .fact{border-inline-start:0;border-top:1px solid var(--line)}
  .fact:first-child{border-top:0}
  .client-row{flex-direction:column;gap:2px}
  .client-row p{text-align:start}
  .btn-wa{width:100%;justify-content:center}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .ring{animation:none;stroke-dashoffset:0}
}

#home-map {
    width: 100%;
    height: 450px;
    min-height: 450px;
    border-radius: 12px;
    z-index: 1;
}

.center-row.active {
    background: #f5f3ee;
    border-color: #3e425e;
}
/* =================================
   Office Image Viewer - Desktop & Mobile
================================= */

#officeViewer.office-viewer {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;
    height: 100dvh;

    max-width: none;
    max-height: none;

    margin: 0;
    padding: 30px;

    border: none;
    border-radius: 0;

    background: transparent;

    color: white;
    overflow: hidden;
}

#officeViewer.office-viewer[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

#officeViewer.office-viewer::backdrop {
    background: rgba(10, 10, 20, .96);
}

.office-viewer-stage {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 15px;
}

#officeViewerImage {
    display: block;

    width: auto;
    height: auto;

    max-width: 85vw;
    max-height: 85vh;
    max-height: 85dvh;

    object-fit: contain;

    border-radius: 5px;
}

#officeViewerCounter {
    color: white;
    font-size: 16px;
    direction: ltr;
}

.office-viewer-close,
.office-viewer-prev,
.office-viewer-next {
    position: absolute;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    border: none;
    cursor: pointer;

    transition: .2s ease;
}

.office-viewer-close {
    top: 20px;
    inset-inline-end: 30px;

    width: 48px;
    height: 48px;

    font-size: 42px;
}

.office-viewer-prev,
.office-viewer-next {
    top: 50%;
    transform: translateY(-50%);

    width: 52px;
    height: 52px;

    border-radius: 50%;

    background: rgba(255,255,255,.18);
    font-size: 25px;
}

.office-viewer-prev {
    inset-inline-start: 25px;
}

.office-viewer-next {
    inset-inline-end: 25px;
}

.office-viewer-prev:hover,
.office-viewer-next:hover {
    background: var(--navy);
}

.office-viewer-close:hover {
    color: var(--stone);
}

/* Desktop */

@media (min-width: 1024px) {

    #officeViewerImage {
        max-width: 82vw;
        max-height: 86vh;
    }

}

/* Mobile */

@media (max-width: 640px) {

    #officeViewer.office-viewer {
        padding: 15px;
    }

    #officeViewerImage {
        max-width: 100%;
        max-height: 76vh;
        max-height: 76dvh;
    }

    .office-viewer-prev,
    .office-viewer-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .office-viewer-prev {
        inset-inline-start: 5px;
    }

    .office-viewer-next {
        inset-inline-end: 5px;
    }

    .office-viewer-close {
        top: 8px;
        inset-inline-end: 12px;
    }

}

.gallery-main > img,
.thumb img {
    cursor: zoom-in;
}
/* Mobile Navigation */

.mobile-menu-btn {
    display: none;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 25px;
    cursor: pointer;
}

@media (max-width: 768px) {

    .top {
        position: relative;
        z-index: 1000;
    }

    .top-in {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 75px;
        position: relative;
    }

    .brand img {
        max-height: 58px;
        width: auto;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .nav {
        display: none !important;

        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        width: 100%;
        padding: 12px 18px 20px;

        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 10px 25px rgba(0,0,0,.10);

        flex-direction: column;
        align-items: stretch;
        gap: 0;

        height: auto;
    }

    .nav.mobile-open {
        display: flex !important;
    }

    .nav > a {
        display: block;
        padding: 13px 8px;
        border-bottom: 1px solid #eee;
        text-align: start;
        font-size: 15px;
    }

    .nav .nav-cta {
        text-align: center;
        margin-top: 12px;
        border-radius: 5px;
    }

    .header-actions {
        padding: 14px 8px 0;
    }

    .lang-switch {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

}
