/* =========================================================
   شركة القيصر أساس التميز — ملف التنسيق الرئيسي
   تصميم RTL خفيف بدون مكتبات خارجية
   ========================================================= */

@font-face {
    font-family: "Cairo";
    src: url(../fonts/Cairo.woff) format("woff"), url(../fonts/Cairo.ttf) format("truetype");
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #111111;
    --ink-2: #1b1b1b;
    --ink-3: #262626;
    --gold: #e3b12b;
    --gold-light: #f0c64a;
    --gold-dark: #8c6a0c;
    --gold-soft: #fbf1d3;
    --paper: #f6f6f4;
    --line: #e6e4de;
    --text: #2b2b2b;
    --muted: #6b6b6b;
    --white: #fff;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(18, 18, 18, .07);
    --shadow-lg: 0 22px 50px rgba(18, 18, 18, .14);
    --header-h: 84px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--text);
    background: var(--white);
    direction: rtl;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
h1, h2, h3, h4 { font-family: inherit; color: var(--ink); line-height: 1.4; margin: 0 0 .6em; font-weight: 800; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 2000;
    background: var(--gold); color: var(--ink); padding: 10px 18px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6em;
    padding: .8em 1.6em; border-radius: 10px; border: 2px solid transparent;
    font-weight: 700; font-size: 1rem; line-height: 1.4; cursor: pointer;
    transition: background .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); box-shadow: 0 10px 24px rgba(227, 177, 43, .35); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-3); }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }
.btn-outline { border-color: var(--gold); color: var(--gold-dark); }
.btn-outline:hover { background: var(--gold); color: var(--ink); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb457; }
.btn-block { width: 100%; }

/* ---------- Topbar ---------- */
.topbar { background: var(--ink); color: #cfcfcf; font-size: .875rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 42px; gap: 16px; }
.topbar-list { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar a { display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: var(--gold-light); }
.topbar i { color: var(--gold); }
@media (max-width: 767px) { .topbar { display: none; } }

/* ---------- Header / Navbar ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .3s, border-color .3s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.08); border-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 62px; height: 62px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-ar { font-size: 1.3rem; font-weight: 800; color: var(--ink); line-height: 1.35; white-space: nowrap; }
.brand-en { font-size: 1.3rem; font-weight: 800; line-height: 1.35; color: var(--gold-dark); letter-spacing: 0; direction: ltr; text-align: right; white-space: nowrap; }

.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-link {
    position: relative; padding: 8px 14px; font-weight: 700; font-size: 1.05rem; color: var(--ink);
}
.nav-link::after {
    content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px;
    background: var(--gold); transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--gold-dark); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-cta { margin-inline-start: 12px; padding: .65em 1.2em; font-size: .95rem; }

.nav-toggle {
    display: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--white); cursor: pointer; align-items: center; justify-content: center; color: var(--ink); font-size: 1.2rem;
}

@media (max-width: 991px) {
    :root { --header-h: 72px; }
    .brand img { width: 50px; height: 50px; }
    .brand-ar { font-size: 1.1rem; }
    .brand-en { font-size: 1.1rem; }
    .nav-toggle { display: inline-flex; }
    .nav-menu {
        position: absolute; top: 100%; inset-inline: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--white); border-top: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(0,0,0,.1);
        padding: 10px 20px 20px;
        max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
        transition: max-height .35s var(--ease), opacity .25s, visibility .35s;
    }
    .nav-menu.open { max-height: 480px; opacity: 1; visibility: visible; }
    .nav-link { padding: 14px 4px; border-bottom: 1px solid var(--line); }
    .nav-link::after { display: none; }
    .nav-cta { margin: 16px 0 0; }
}
@media (max-width: 380px) {
    .brand-ar, .brand-en { font-size: 1rem; }
    .brand img { width: 44px; height: 44px; }
}

/* ---------- Hero (home) ---------- */
.hero {
    position: relative; min-height: min(86vh, 760px); display: flex; align-items: center;
    color: var(--white); overflow: hidden; background: var(--ink);
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(270deg, rgba(10,10,10,.88) 0%, rgba(10,10,10,.6) 45%, rgba(10,10,10,.2) 100%);
}
.hero .container { position: relative; z-index: 2; padding-block: 90px; }
.hero-content { max-width: 640px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px; font-weight: 700;
    font-size: .88rem; margin-bottom: 16px; padding: 4px 16px 4px 14px; border-radius: 30px;
    background: var(--ink); color: var(--white) !important; line-height: 1.8;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.eyebrow::after { display: none !important; }
.hero .eyebrow, .bg-dark .eyebrow, .page-header .eyebrow { background: var(--gold); color: var(--ink) !important; }
.hero .eyebrow::before, .bg-dark .eyebrow::before, .page-header .eyebrow::before { background: var(--ink); }
.hl { color: var(--gold); }
.bg-white-hl .hl, .section .hl { color: var(--gold); }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.3; margin-bottom: 18px; }
.hero h1 span { color: var(--gold-light); }
.hero p { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #e6e6e6; max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-scroll {
    position: absolute; z-index: 2; bottom: 24px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 46px; border: 2px solid rgba(255,255,255,.6); border-radius: 20px;
}
.hero-scroll::after {
    content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
    background: var(--gold-light); border-radius: 2px; animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@media (max-width: 767px) {
    .hero { min-height: 78vh; }
    .hero::before { background: linear-gradient(0deg, rgba(10,10,10,.9) 0%, rgba(10,10,10,.55) 60%, rgba(10,10,10,.35) 100%); }
    .hero .container { padding-block: 70px 90px; }
    .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
    position: relative; color: var(--white); text-align: center; padding: 84px 0 76px;
    background: var(--ink) url(../img/bg/bg-dark.jpg) center bottom / max(100%, 1100px) auto no-repeat;
    overflow: hidden;
}
.page-header h1 { color: var(--white); font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 10px; }
.page-header p { color: #dcdcdc; max-width: 720px; margin: 0 auto 18px; font-size: 1.08rem; }
.breadcrumb { display: inline-flex; gap: 10px; align-items: center; font-size: .95rem; color: #bdbdbd; }
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.bg-paper { background: var(--paper); }
.bg-dark { background: var(--ink); color: #d6d6d6; }
.bg-dark h2, .bg-dark h3 { color: var(--white); }
.bg-construct { background: var(--white) url(../img/bg/bg-light.jpg) center bottom / max(100%, 1100px) auto no-repeat; }
.bg-construct-2 { background: var(--white) url(../img/bg/bg-light-2.jpg) center bottom / max(100%, 1100px) auto no-repeat; }
.bg-dark { background: var(--ink) url(../img/bg/bg-dark.jpg) center bottom / max(100%, 1100px) auto no-repeat; }
.bg-dark-2 { background: var(--ink) url(../img/bg/bg-dark-2.jpg) center bottom / max(100%, 1100px) auto no-repeat; color: #d6d6d6; }
.bg-dark-2 h2, .bg-dark-2 h3 { color: var(--white); }
.bg-dark-2 .section-lead { color: #bdbdbd; }
.bg-dark-2 .eyebrow { background: var(--gold); color: var(--ink) !important; }
.bg-dark-2 .eyebrow::before { background: var(--ink); }
.section.bg-construct, .section.bg-construct-2, .section.bg-dark, .section.bg-dark-2 { padding-bottom: 150px; }
@media (max-width: 767px) { .section.bg-construct, .section.bg-construct-2, .section.bg-dark, .section.bg-dark-2 { padding-bottom: 120px; } }
.hazard { height: 8px; background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, var(--ink) 14px 28px); }
@media (max-width: 767px) { .section { padding: 68px 0; } .section-sm { padding: 48px 0; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-lead { color: var(--muted); font-size: 1.1rem; margin: 0; }
.bg-dark .section-lead { color: #bdbdbd; }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .grid { gap: 20px; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.about-media { position: relative; padding: 0 0 28px 28px; }
.about-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 5 / 5.6; object-fit: cover; position: relative; z-index: 1; box-shadow: var(--shadow-lg); }
.about-media::before {
    content: ""; position: absolute; left: 0; bottom: 0; width: 75%; height: 75%;
    border: 3px solid var(--gold); border-radius: var(--radius);
}
.about-badge {
    position: absolute; z-index: 2; right: -18px; bottom: 54px;
    background: var(--ink); color: var(--white); padding: 16px 20px; border-radius: 12px;
    display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg);
}
.about-badge i { color: var(--gold-light); font-size: 1.8rem; }
.about-badge strong { display: block; font-size: 1.05rem; }
.about-badge span { font-size: .85rem; color: #bdbdbd; }
.about h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.about-text p { color: #4a4a4a; }
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; margin: 22px 0 30px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--ink); }
.checklist i { color: var(--gold); margin-top: 7px; }
@media (max-width: 991px) {
    .about { grid-template-columns: 1fr; gap: 44px; }
    .about-media { max-width: 480px; margin-inline: auto; width: 100%; }
    .about-badge { right: 0; }
}
@media (max-width: 480px) { .checklist { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 34px 28px; height: 100%;
    transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; }
.card-icon {
    width: 64px; height: 64px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold-soft); color: var(--gold-dark); font-size: 1.6rem; margin-bottom: 20px;
    transition: background .3s, color .3s;
}
.card:hover .card-icon { background: var(--gold); color: var(--ink); }
.card-center { text-align: center; }

/* Value cards (dark) */
.value-card { background: var(--ink-2); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 36px 30px; height: 100%; position: relative; overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.value-card:hover { border-color: rgba(227,177,43,.6); transform: translateY(-4px); }
.value-card .num { position: absolute; top: 14px; left: 22px; font-size: 3.4rem; font-weight: 800; color: rgba(255,255,255,.05); line-height: 1; }
.value-card .card-icon { background: rgba(227,177,43,.14); color: var(--gold-light); }
.value-card h3 { font-size: 1.35rem; }
.value-card p { color: #bdbdbd; margin: 0; }

/* ---------- Service cards (image) ---------- */
.service-card {
    display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--line); height: 100%;
    transition: transform .35s var(--ease), box-shadow .35s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.service-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .service-card-media img { transform: scale(1.06); }
.service-card-icon {
    position: absolute; bottom: -24px; inset-inline-start: 22px; z-index: 1;
    width: 54px; height: 54px; border-radius: 14px; background: var(--gold); color: var(--ink);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.service-card-media { overflow: visible; }
.service-card-media .clip { position: absolute; inset: 0; overflow: hidden; }
.service-card-body { padding: 38px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.service-card-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.service-card-body p { color: var(--muted); font-size: .98rem; flex: 1; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold-dark); margin-top: 6px; }
.link-arrow i { transition: transform .25s; }
.link-arrow:hover i { transform: translateX(-5px); }

/* Service detail rows (services page) */
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.service-row + .service-row { margin-top: 90px; }
.service-row:nth-child(even) .service-row-media { order: 2; }
.service-row-media { position: relative; }
.service-row-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.service-row-media .tag {
    position: absolute; top: 18px; inset-inline-start: 18px; background: var(--ink); color: var(--gold-light);
    font-weight: 800; font-size: 1.1rem; width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.service-row h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.service-row p { color: #4a4a4a; }
.service-row .checklist { grid-template-columns: 1fr 1fr; margin-bottom: 26px; }
@media (max-width: 900px) {
    .service-row { grid-template-columns: 1fr; gap: 30px; }
    .service-row:nth-child(even) .service-row-media { order: 0; }
    .service-row + .service-row { margin-top: 64px; }
}

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; text-align: center; padding: 10px 14px; }
.step-num {
    width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
    background: var(--white); border: 2px solid var(--gold); color: var(--gold-dark);
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem; position: relative; z-index: 1;
}
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .96rem; margin: 0; }
@media (min-width: 992px) {
    .steps .step:not(:last-child)::after {
        content: ""; position: absolute; top: 47px; left: -14px; width: calc(100% - 74px); transform: translateX(-37px);
        border-top: 2px dashed rgba(227,177,43,.5);
    }
}

/* ---------- Projects ---------- */
.project-card {
    position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--ink);
    aspect-ratio: 4 / 4.6; cursor: pointer; border: 0; padding: 0; width: 100%; text-align: right; color: var(--white);
    box-shadow: var(--shadow);
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .4s; opacity: .92; }
.project-card::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(8,8,8,.92) 0%, rgba(8,8,8,.45) 45%, rgba(8,8,8,0) 75%);
}
.project-card:hover img { transform: scale(1.07); opacity: 1; }
.project-info { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; padding: 24px; }
.project-cat { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--ink); background: var(--gold); padding: 3px 12px; border-radius: 20px; margin-bottom: 10px; }
.project-info h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 4px; }
.project-info p { color: #d0d0d0; font-size: .95rem; margin: 0 0 12px; line-height: 1.7; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; color: var(--gold-light); font-weight: 700; }
.project-meta .count { color: #bdbdbd; font-weight: 600; }
.project-meta .open { display: inline-flex; align-items: center; gap: 8px; }
.project-card:hover .project-meta .open i { transform: scale(1.15); }
.project-meta i { transition: transform .25s; }

/* ---------- Certificates ---------- */
.cert-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.cert-doc {
    display: block; background: var(--white); padding: 14px; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); transform: rotate(-2deg); transition: transform .4s var(--ease); cursor: zoom-in; border: 0; width: 100%;
}
.cert-doc:hover { transform: rotate(0) scale(1.02); }
.cert-doc img { width: 100%; border-radius: 6px; }
.cert-list { display: grid; gap: 14px; margin: 24px 0; }
.cert-item {
    display: flex; gap: 16px; align-items: center; background: var(--white); border: 1px solid var(--line);
    border-radius: 12px; padding: 14px 18px;
}
.cert-item .card-icon { width: 50px; height: 50px; font-size: 1.2rem; margin: 0; flex-shrink: 0; }
.cert-item strong { display: block; color: var(--ink); font-size: 1.05rem; direction: ltr; text-align: right; }
.cert-item span { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) {
    .cert-wrap { grid-template-columns: 1fr; gap: 36px; }
    .cert-doc { max-width: 320px; margin-inline: auto; }
}

/* ---------- CTA ---------- */
.cta {
    position: relative; overflow: hidden; border-radius: 22px; padding: 64px 48px;
    background: var(--gold) url(../img/bg/bg-gold.jpg) center / cover no-repeat;
    color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta::before {
    content: ""; position: absolute; left: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
    display: none;
}
.cta > * { position: relative; }
.cta h2 { color: var(--ink); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.cta h2 span { color: var(--white); text-shadow: 0 2px 0 rgba(0,0,0,.08); }
.cta p { color: #2b2b2b; font-weight: 600; margin: 0; max-width: 620px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .cta { padding: 44px 24px; text-align: center; justify-content: center; } .cta-actions { justify-content: center; width: 100%; } .cta-actions .btn { flex: 1 1 100%; } }

/* ---------- Contact ---------- */
.contact-card { text-align: center; }
.contact-card a { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--gold-dark); }
.contact-card p { margin-bottom: 8px; }
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: stretch; }
@media (max-width: 991px) { .contact-layout { grid-template-columns: 1fr; } }
.form-box { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form-box h2 { font-size: 1.7rem; margin-bottom: 4px; }
.form-box > p { color: var(--muted); margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .97rem; color: var(--ink); }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--text);
    border: 1px solid #d9d5cc; border-radius: 10px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(227,177,43,.18); }
.field input[type="tel"], .field input[type="email"] { direction: ltr; text-align: right; }
.form-note { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.form-status { margin-top: 10px; font-weight: 600; color: #1d7a46; min-height: 1.6em; }
.map-box { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); min-height: 440px; background: var(--paper); }
.map-box iframe { width: 100%; height: 100%; min-height: 440px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: #0e0e0e; border-top: 8px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--gold) 0 14px, var(--ink) 14px 28px) 8; color: #b9b9b9; font-size: .97rem; }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; padding: 72px 0 52px; }
@media (max-width: 991px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer-main { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 40px; } }
.footer-brand { display: inline-flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.footer-brand img { width: 64px; height: 64px; object-fit: contain; }
.footer-brand strong { display: block; color: var(--white); font-size: 1.2rem; font-weight: 800; }
.footer-brand span { display: block; color: var(--gold-light); font-size: 1.2rem; font-weight: 800; line-height: 1.4; direction: ltr; text-align: right; }
.footer-about p { line-height: 2; margin-bottom: 18px; }
.footer-badges img { max-width: 300px; width: 100%; border-radius: 6px; }
.site-footer h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 20px; position: relative; padding-bottom: 12px; }
.site-footer h3::after { content: ""; position: absolute; right: 0; bottom: 0; width: 40px; height: 2px; background: var(--gold); }
.footer-links li + li { margin-top: 10px; }
.footer-links a { display: inline-flex; gap: 8px; align-items: center; }
.footer-links a:hover { color: var(--gold-light); }
.footer-links a i { font-size: .7rem; color: var(--gold); }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact li + li { margin-top: 14px; }
.footer-contact i { color: var(--gold); width: 18px; margin-top: 7px; text-align: center; }
.footer-contact a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; font-size: .9rem; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-bottom strong { color: var(--gold-light); }
@media (max-width: 600px) { .footer-bottom .container { justify-content: center; text-align: center; } }

/* ---------- Floating buttons ---------- */
.float-btn {
    position: fixed; bottom: 22px; z-index: 900; width: 54px; height: 54px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.35rem; border: 0; cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,.22); transition: transform .25s var(--ease), opacity .3s, visibility .3s;
}
.float-btn:hover { transform: translateY(-3px); }
.float-whatsapp { left: 22px; background: #25d366; color: #fff; font-size: 1.7rem; }
.float-whatsapp::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: pulse 2.4s infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
.back-to-top { right: 22px; background: var(--ink); color: var(--gold-light); opacity: 0; visibility: hidden; }
.back-to-top.show { opacity: 1; visibility: visible; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 3000; background: rgba(6,6,6,.95);
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 80px 24px;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox-stage img, .lightbox-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-caption { color: #e6e6e6; text-align: center; margin-top: 14px; font-size: .97rem; }
.lightbox-caption strong { color: var(--gold-light); }
.lb-btn {
    position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.1); color: #fff; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.lb-btn:hover { background: var(--gold); color: var(--ink); }
.lb-close { top: 16px; left: 18px; }
.lb-prev { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-thumbs { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; max-width: 100%; padding: 4px; scrollbar-width: thin; }
.lightbox-thumbs button { flex: 0 0 auto; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #222; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; position: relative; }
.lightbox-thumbs button.active { opacity: 1; border-color: var(--gold); }
.lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lightbox-thumbs .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; text-shadow: 0 0 6px #000; }
@media (max-width: 640px) {
    .lightbox { padding: 64px 12px 16px; }
    .lb-prev, .lb-next { top: auto; bottom: 86px; transform: none; width: 44px; height: 44px; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.no-js .reveal { opacity: 1; transform: none; }

/* utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   إضافات مستوحاة من الملف التعريفي
   ========================================================= */
.btn-outline-dark { border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: var(--white); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
    border-radius: var(--radius); padding: 26px 24px; display: flex; align-items: center; gap: 18px;
    background: var(--ink-2); border: 1px solid rgba(255,255,255,.1); color: #cfcfcf;
}
.stat:nth-child(1) { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.stat:nth-child(4) { background: var(--white); color: var(--ink); }
.stat strong { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 800; line-height: 1; color: inherit; direction: ltr; }
.stat:nth-child(2) strong, .stat:nth-child(3) strong { color: var(--white); }
.stat span { font-size: .98rem; font-weight: 600; line-height: 1.6; }
@media (max-width: 991px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } .stat { padding: 20px; } }
.stats-band { background: var(--ink); padding: 48px 0; }

/* ---------- Clients ---------- */
.clients { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.client {
    display: flex; align-items: center; justify-content: center; text-align: center; min-height: 86px;
    padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--white);
    font-weight: 700; font-size: .95rem; line-height: 1.6; color: var(--ink); transition: background .25s, color .25s, transform .25s;
}
.client:nth-child(4n+1) { background: var(--gold); border-color: var(--gold); }
.client:nth-child(7n+3) { background: var(--ink); border-color: var(--ink); color: var(--white); }
.client:hover { transform: translateY(-3px); }
.partners { text-align: center; margin-top: 26px; color: var(--muted); font-size: .97rem; }
.partners strong { color: var(--ink); }
@media (max-width: 991px) { .clients { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .clients { grid-template-columns: repeat(2, 1fr); } .client { font-size: .88rem; min-height: 74px; } }

/* ---------- Tabs & project list ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.tab {
    border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 30px;
    padding: 9px 20px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: .2s;
}
.tab .n { background: var(--paper); border-radius: 20px; padding: 0 9px; font-size: .85rem; }
.tab:hover { border-color: var(--gold); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.tab[aria-selected="true"] .n { background: var(--gold); color: var(--ink); }
.tab-panel[hidden] { display: none; }
.plist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plist li {
    display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line);
    border-inline-start: 4px solid var(--gold); border-radius: 10px; padding: 14px 18px;
}
.plist .ic { flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-dark); display: flex; align-items: center; justify-content: center; }
.plist strong { display: block; color: var(--ink); font-size: 1.02rem; line-height: 1.6; }
.plist span { display: block; color: var(--muted); font-size: .92rem; }
@media (max-width: 768px) { .plist { grid-template-columns: 1fr; } }
.panel-note { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--white); font-weight: 600; font-size: .95rem; }
.chip.gold { background: var(--gold); border-color: var(--gold); }
.chip.dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.deraah { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.deraah .big { font-size: 3.4rem; font-weight: 800; color: var(--gold); line-height: 1; }
.deraah h3 { margin: 8px 0 6px; }
.deraah h4 { font-size: 1rem; margin: 14px 0 10px; color: var(--muted); }
@media (max-width: 768px) { .deraah { grid-template-columns: 1fr; } }

/* project card extras */
.project-year { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 1; background: var(--ink); color: var(--gold); font-weight: 800; font-size: .85rem; padding: 2px 12px; border-radius: 20px; }
.project-loc { display: inline-flex; gap: 6px; align-items: center; color: #e2e2e2; font-size: .9rem; margin-bottom: 6px; }
.project-loc i { color: var(--gold); }
.site-card { aspect-ratio: 4 / 3; }

/* ---------- Certificates page ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 991px) { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-card {
    display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; cursor: zoom-in; padding: 0; text-align: right; width: 100%; transition: transform .3s var(--ease), box-shadow .3s;
}
.doc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.doc-card .frame { background: var(--paper) url(../img/bg/bg-light-2.jpg) center / cover; padding: 22px; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3.4; }
.doc-card .frame img { max-height: 100%; width: auto; max-width: 100%; box-shadow: 0 10px 26px rgba(0,0,0,.18); border: 4px solid var(--gold); border-radius: 4px; background: #fff; }
.doc-card .body { padding: 18px 22px 22px; border-top: 4px solid var(--gold); }
.doc-card .body small { color: var(--gold-dark); font-weight: 700; }
.doc-card .body h3 { font-size: 1.15rem; margin: 2px 0 4px; }
.doc-card .body p { color: var(--muted); font-size: .93rem; margin: 0; }
.doc-card .body .num { direction: ltr; display: inline-block; font-weight: 700; color: var(--ink); }
.bg-dark-2 .doc-card .body h3 { color: var(--ink); }
.safety { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.safety > div { border-radius: var(--radius); padding: 26px; background: var(--ink); color: #cfcfcf; }
.safety > div:nth-child(2) { background: var(--white); color: var(--text); border: 1px solid var(--line); }
.safety > div:nth-child(3) { background: var(--gold); color: var(--ink); }
.safety h3 { font-size: 1.15rem; }
.safety > div:nth-child(1) h3 { color: var(--white); }
@media (max-width: 860px) { .safety { grid-template-columns: 1fr; } }

/* ---------- Social ---------- */
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social:empty { display: none; }
.social a {
    width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.07); border: 1px solid rgba(227,177,43,.35); color: #fff; transition: .25s;
}
.social a:hover { background: var(--gold); color: var(--ink); transform: translateY(-3px); }
.topbar .social a { width: 28px; height: 28px; border-radius: 6px; font-size: .8rem; }
.footer-social { margin-top: 22px; }
.footer-social:has(.social:empty) { display: none; }

/* cities bars */
.cities { display: grid; gap: 12px; }
.city { display: grid; grid-template-columns: 90px 1fr 40px; gap: 12px; align-items: center; font-weight: 700; }
.city .bar { height: 14px; background: var(--paper); border-radius: 8px; overflow: hidden; }
.city .bar span { display: block; height: 100%; background: var(--gold); border-radius: 8px; }
.city:nth-child(even) .bar span { background: var(--ink); }
.city b { direction: ltr; text-align: left; }
.leader { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: center; }
.leader-badge { background: var(--gold) url(../img/bg/bg-gold.jpg) center/cover; border-radius: 20px; padding: 34px 28px; color: var(--ink); }
.leader-badge strong { font-size: 3.6rem; line-height: 1; display: block; direction: ltr; text-align: right; }
@media (max-width: 860px) { .leader { grid-template-columns: 1fr; } }
.grid-flex { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.grid-flex > * { flex: 0 1 calc((100% - 56px) / 3); height: auto; }
@media (max-width: 991px) { .grid-flex > * { flex-basis: calc((100% - 28px) / 2); } }
@media (max-width: 640px) { .grid-flex > * { flex-basis: 100%; } }
.doc-card.framed .frame img { border: 0; box-shadow: 0 8px 20px rgba(0,0,0,.15); border-radius: 2px; }
.doc-flex { display: flex; flex-wrap: wrap; justify-content: center; }
.doc-flex > * { flex: 0 1 calc((100% - 52px) / 3); }
@media (max-width: 991px) { .doc-flex > * { flex-basis: calc((100% - 26px) / 2); } }
@media (max-width: 560px) { .doc-flex > * { flex-basis: 100%; } }
.safety > div:nth-child(1) { border: 1px solid rgba(227,177,43,.45); }

/* ---------- Project categories (numbers only) ---------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat { border-radius: var(--radius); padding: 28px 22px; background: var(--ink); color: #cfcfcf; border: 1px solid var(--ink); transition: transform .3s var(--ease); }
.cat:hover { transform: translateY(-5px); }
.cat:nth-child(1), .cat:nth-child(4) { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.cat:nth-child(3) { background: var(--white); border-color: var(--line); color: var(--text); }
.cat-ic { display: inline-flex; width: 46px; height: 46px; border-radius: 12px; align-items: center; justify-content: center; background: rgba(255,255,255,.12); color: var(--gold); font-size: 1.2rem; }
.cat:nth-child(1) .cat-ic, .cat:nth-child(4) .cat-ic { background: var(--ink); }
.cat:nth-child(3) .cat-ic { background: var(--gold-soft); color: var(--gold-dark); }
.cat strong { display: block; font-size: 3.2rem; font-weight: 800; line-height: 1.1; margin: 16px 0 6px; color: var(--white); }
.cat:nth-child(1) strong, .cat:nth-child(4) strong, .cat:nth-child(3) strong { color: var(--ink); }
.cat h3 { color: inherit; font-size: 1.1rem; margin-bottom: 4px; }
.cat:nth-child(2) h3, .cat:nth-child(5) h3 { color: var(--white); }
.cat p { margin: 0; font-size: .92rem; opacity: .85; }
@media (max-width: 1100px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cats { grid-template-columns: repeat(2, 1fr); } .cat strong { font-size: 2.6rem; } }
section[id] { scroll-margin-top: calc(var(--header-h) + 10px); }
/* اسم الشركة بالإنجليزي بنفس حجم العربي — ضبط الجوال */
.brand-text { flex-shrink: 0; }
@media (max-width: 480px) {
    .nav { gap: 10px; }
    .brand { gap: 8px; }
    .brand img { width: 42px; height: 42px; }
    .brand-ar, .brand-en { font-size: 1rem; }
}
@media (max-width: 380px) {
    .brand img { width: 38px; height: 38px; }
    .brand-ar, .brand-en { font-size: .86rem; }
}
@media (max-width: 340px) {
    .brand-ar, .brand-en { font-size: .76rem; }
    .nav-toggle { width: 40px; height: 40px; }
}
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; } }

/* ---------- مقدمة الفيديو (الشعار) في الواجهة ---------- */
.hero::before, .hero .hero-content, .hero .hero-scroll { transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
    html:not(.no-js) .hero.intro::before,
    html:not(.no-js) .hero.intro .hero-scroll { opacity: 0; }
    html:not(.no-js) .hero.intro .hero-content { opacity: 0; transform: translateY(30px); }
    /* احتياط: إظهار النص حتى لو لم يعمل الفيديو */
    html:not(.no-js) .hero.intro::before,
    html:not(.no-js) .hero.intro .hero-content,
    html:not(.no-js) .hero.intro .hero-scroll { animation: heroReveal .8s ease 15s forwards; }
}
@keyframes heroReveal { to { opacity: 1; transform: none; } }

/* اسم الشركة بالعربي بنفس عرض الاسم الإنجليزي (الشريط العلوي والتذييل) */
.brand-ar { font-size: 1.75rem; line-height: 1.2; }
.footer-brand strong { font-size: 1.62rem; line-height: 1.25; }
@media (max-width: 991px) { .brand-ar { font-size: 1.48rem; } }
@media (max-width: 480px) { .brand-ar { font-size: 1.35rem; } }
@media (max-width: 380px) { .brand-ar { font-size: 1.16rem; } }
@media (max-width: 340px) { .brand-ar { font-size: 1.03rem; } }


/* =========================================================
   شهادات الأيزو — عرض ثلاثي الأبعاد
   ========================================================= */
.cert-show { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.cert-stage { position: relative; height: 600px; perspective: 1600px; }
.cert-card {
    position: absolute; top: 50%; left: 50%; width: 340px; aspect-ratio: 565 / 800; margin: 0; padding: 0; border: 0; cursor: pointer;
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
    transform-style: preserve-3d;
    transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .9s, opacity .9s, box-shadow .9s;
    transform: translate(-50%, -50%);
}
.cert-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cert-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.35) 48%, rgba(255,255,255,0) 62%); background-size: 260% 100%; background-position: 130% 0; transition: background-position 1.1s ease; pointer-events: none; }
.cert-card.pos-0 { z-index: 3; transform: translate(-50%, -50%) rotateY(0) scale(1); box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 3px var(--gold); }
.cert-card.pos-0::after { background-position: -40% 0; }
.cert-card.pos-1 { z-index: 2; transform: translate(-50%, -50%) translateX(-58%) translateZ(-180px) rotateY(28deg) scale(.86); filter: brightness(.45) saturate(.7); }
.cert-card.pos-2 { z-index: 1; transform: translate(-50%, -50%) translateX(58%) translateZ(-180px) rotateY(-28deg) scale(.86); filter: brightness(.45) saturate(.7); }
.cert-card:not(.pos-0):hover { filter: brightness(.7); }
.cert-zoom {
    position: absolute; bottom: 14px; left: 14px; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--gold);
    display: flex; align-items: center; justify-content: center; font-size: 1.05rem; opacity: 0; transform: scale(.6); transition: .35s;
}
.cert-card.pos-0 .cert-zoom { opacity: 1; transform: none; }
.cert-card.pos-0:hover .cert-zoom { background: var(--gold); color: var(--ink); }
/* rotating seal */
.cert-seal { position: absolute; z-index: 4; width: 150px; height: 150px; top: 18px; right: 6%; animation: sealSpin 24s linear infinite; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.cert-seal .s1 { fill: var(--gold); }
.cert-seal .s2 { fill: var(--ink); }
.cert-seal text { font-family: "Cairo", sans-serif; font-weight: 800; fill: var(--ink); font-size: 15.5px; letter-spacing: .4px; }
.cert-seal .big, .cert-seal .small { fill: var(--gold); text-anchor: middle; }
.cert-seal .big { font-size: 34px; }
.cert-seal .small { font-size: 11px; letter-spacing: 2px; }
@keyframes sealSpin { to { transform: rotate(360deg); } }
.cert-seal .big, .cert-seal .small { transform-origin: 100px 100px; animation: sealCounter 24s linear infinite; }
@keyframes sealCounter { to { transform: rotate(-360deg); } }

/* tabs */
.cert-tabs { display: grid; gap: 14px; }
.cert-tab {
    position: relative; display: flex; gap: 18px; align-items: center; text-align: right; width: 100%; cursor: pointer;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px 22px; color: #cfcfcf;
    overflow: hidden; transition: background .35s, border-color .35s, transform .35s var(--ease);
}
.cert-tab:hover { border-color: rgba(227,177,43,.5); }
.cert-tab[aria-selected="true"] { background: var(--white); border-color: var(--white); color: var(--text); transform: translateX(-8px); }
.cert-tab .ic { flex: 0 0 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; background: rgba(227,177,43,.14); color: var(--gold); transition: .35s; }
.cert-tab[aria-selected="true"] .ic { background: var(--gold); color: var(--ink); }
.cert-tab .tx { display: flex; flex-direction: column; line-height: 1.5; }
.cert-tab strong { font-size: 1.3rem; color: var(--white); text-align: right; transition: color .35s; }
.cert-tab[aria-selected="true"] strong { color: var(--ink); }
.cert-tab .tx > span { font-weight: 700; font-size: 1rem; }
.cert-tab small { font-size: .85rem; opacity: .75; margin-top: 2px; }
.cert-tab small b { font-weight: 700; }
.cert-tab .bar { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: transparent; }
.cert-tab .bar span { display: block; height: 100%; width: 0; background: var(--gold); }
.cert-tab[aria-selected="true"] .bar span { animation: certProgress var(--cert-dur, 5s) linear forwards; }
.cert-show.paused .cert-tab .bar span { animation-play-state: paused; }
@keyframes certProgress { to { width: 100%; } }
.cert-scope { display: flex; gap: 14px; margin-top: 22px; padding: 18px 20px; border-radius: 14px; border: 1px dashed rgba(227,177,43,.45); color: #cfcfcf; font-size: .95rem; }
.cert-scope i { color: var(--gold); margin-top: 6px; }
.cert-scope p { margin: 0; line-height: 1.9; }
.cert-scope strong { color: var(--white); }
.cert-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.cert-meta span { display: inline-flex; gap: 8px; align-items: center; padding: 6px 16px; border-radius: 30px; background: rgba(255,255,255,.06); color: #ddd; font-size: .92rem; }
.cert-meta i { color: var(--gold); }
.cert-meta b { color: var(--gold); }

@media (max-width: 991px) {
    .cert-show { grid-template-columns: 1fr; gap: 26px; }
    .cert-stage { height: 520px; }
    .cert-card { width: 290px; }
    .cert-seal { width: 120px; height: 120px; right: 2%; top: 0; }
}
@media (max-width: 560px) {
    .cert-stage { height: 420px; }
    .cert-card { width: 230px; }
    .cert-card.pos-1 { transform: translate(-50%, -50%) translateX(-42%) translateZ(-160px) rotateY(30deg) scale(.82); }
    .cert-card.pos-2 { transform: translate(-50%, -50%) translateX(42%) translateZ(-160px) rotateY(-30deg) scale(.82); }
    .cert-seal { width: 92px; height: 92px; }
    .cert-tab { padding: 14px 16px; gap: 14px; }
    .cert-tab[aria-selected="true"] { transform: none; }
    .cert-tab .ic { flex-basis: 46px; height: 46px; font-size: 1.1rem; }
    .cert-tab strong { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .cert-seal, .cert-seal .big, .cert-seal .small { animation: none; } }
.cert-seal .ring-txt { font-size: 14px; letter-spacing: 0; unicode-bidi: plaintext; }

/* الواجهة على الكمبيوتر بنفس أبعاد الفيديو (16:9) حتى يظهر كاملًا بدون قص */
@media (min-width: 768px) {
    .hero { min-height: 0; aspect-ratio: 16 / 9; }
    .hero .container { padding-block: 40px; }
}

/* =========================================================
   زر تغيير اللغة
   ========================================================= */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 30px;
    border: 1.5px solid var(--ink); color: var(--ink); font-weight: 800; font-size: .92rem; line-height: 1.4; white-space: nowrap;
    transition: background .2s, color .2s;
}
.lang-switch:hover { background: var(--ink); color: var(--gold); }
.lang-switch i { color: var(--gold-dark); }
.lang-switch:hover i { color: var(--gold); }
@media (min-width: 992px) and (max-width: 1240px) {
    .nav-link { padding: 8px 9px; font-size: .98rem; }
    .nav-link::after { inset-inline: 9px; }
    .nav-cta { margin-inline-start: 6px; padding: .6em .9em; font-size: .88rem; }
    .lang-switch { padding: 6px 11px; font-size: .85rem; }
}
@media (max-width: 380px) { .lang-switch { padding: 5px 9px; font-size: .8rem; gap: 5px; } .nav-actions { gap: 6px; } }

/* =========================================================
   النسخة الإنجليزية (من اليسار لليمين)
   ========================================================= */
html[dir="ltr"] body { direction: ltr; }
[dir="ltr"] .brand-en, [dir="ltr"] .footer-brand span, [dir="ltr"] .cert-item strong { text-align: left; }
[dir="ltr"] .brand-ar { direction: rtl; text-align: left; }
[dir="ltr"] .footer-brand strong { direction: rtl; text-align: left; }
[dir="ltr"] .hero::before { background: linear-gradient(90deg, rgba(10,10,10,.88) 0%, rgba(10,10,10,.6) 45%, rgba(10,10,10,.2) 100%); }
@media (max-width: 767px) { [dir="ltr"] .hero::before { background: linear-gradient(0deg, rgba(10,10,10,.9) 0%, rgba(10,10,10,.55) 60%, rgba(10,10,10,.35) 100%); } }
[dir="ltr"] .about-media { padding: 0 28px 28px 0; }
[dir="ltr"] .about-media::before { left: auto; right: 0; }
[dir="ltr"] .about-badge { right: auto; left: -18px; }
@media (max-width: 991px) { [dir="ltr"] .about-badge { left: 0; } }
[dir="ltr"] .value-card .num { left: auto; right: 22px; }
[dir="ltr"] .link-arrow:hover i { transform: translateX(5px); }
@media (min-width: 992px) {
    [dir="ltr"] .steps .step:not(:last-child)::after { left: auto; right: -14px; transform: translateX(37px); }
}
[dir="ltr"] .project-card, [dir="ltr"] .doc-card, [dir="ltr"] .cert-tab, [dir="ltr"] .cert-tab strong { text-align: left; }
[dir="ltr"] .field input[type="tel"], [dir="ltr"] .field input[type="email"] { text-align: left; }
[dir="ltr"] .site-footer h3::after { right: auto; left: 0; }
[dir="ltr"] .float-whatsapp { left: auto; right: 22px; }
[dir="ltr"] .back-to-top { right: auto; left: 22px; }
[dir="ltr"] .lb-close { left: auto; right: 18px; }
[dir="ltr"] .lb-prev { right: auto; left: 18px; }
[dir="ltr"] .lb-next { left: auto; right: 18px; }
[dir="ltr"] .cert-zoom { left: auto; right: 14px; }
[dir="ltr"] .cert-seal { right: auto; left: 6%; }
@media (max-width: 991px) { [dir="ltr"] .cert-seal { left: 2%; } }
[dir="ltr"] .cert-tab[aria-selected="true"] { transform: translateX(8px); }
@media (max-width: 560px) { [dir="ltr"] .cert-tab[aria-selected="true"] { transform: none; } }
[dir="ltr"] .city b { text-align: right; }
[dir="ltr"] .eyebrow { padding: 4px 14px 4px 16px; }
[dir="ltr"] .pill { padding: 8px 24px 8px 28px; }
[dir="ltr"] .hero h1, [dir="ltr"] .section-title, [dir="ltr"] .page-header h1 { letter-spacing: -.5px; }

/* إصلاحات الشاشات الصغيرة */
.about.about-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 991px) { .about.about-even { grid-template-columns: 1fr; } }
.cat { min-width: 0; }
.cat h3, .cat p { overflow-wrap: anywhere; hyphens: auto; }
.certs { overflow-x: clip; }

/* زر اللغة المختصر على الجوال */
.lang-switch .ls-short { display: none; }
@media (max-width: 480px) {
    .lang-switch { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 10px; font-size: .95rem; }
    .lang-switch i, .lang-switch .ls-full { display: none; }
    .lang-switch .ls-short { display: inline; }
    .nav-actions { gap: 6px; }
}
@media (max-width: 380px) { .nav-toggle { width: 42px; height: 42px; } .lang-switch { width: 38px; height: 38px; } }
@media (max-width: 340px) {
    .brand img { width: 34px; height: 34px; }
    .brand { gap: 6px; }
    .brand-en { font-size: .7rem; }
    .brand-ar { font-size: .95rem; }
}
