@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --navy: #0b1f3a;
  --navy-2: #112d4c;
  --cyan: #00a8e8;
  --cyan-light: #d9f4ff;
  --orange: #ff7a00;
  --ink: #182b3c;
  --muted: #687987;
  --line: #e1e9ee;
  --paper: #f4f7fa;
  --white: #fff;
  --radius: 8px;
  --shadow: 0 18px 55px rgba(11, 31, 58, .12);
  font-family: 'Tajawal', 'DM Sans', sans-serif;
  color: var(--ink);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--white); font-family: 'Tajawal', 'DM Sans', sans-serif; }
body, button, input, textarea, select { font-family: 'Tajawal', 'DM Sans', sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #007eae; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.eyebrow::before { width: 22px; height: 2px; background: var(--orange); content: ''; }
.section-heading { max-width: 680px; margin-bottom: 42px; }
.section-heading h2 { margin: 13px 0 12px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: clamp(30px, 4vw, 45px); line-height: 1.08; letter-spacing: 0; }
.section-heading p { max-width: 590px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.button { display: inline-flex; min-height: 49px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 5px; padding: 0 21px; font-size: 15px; font-weight: 700; transition: transform .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--orange); }
.button-primary:hover { background: #ed6b00; }
.button-outline { border: 1px solid rgba(255,255,255,.58); color: var(--white); background: transparent; }
.button-outline:hover { color: var(--navy); background: var(--white); }
.button-dark { color: var(--white); background: var(--navy); }
.icon-button { display: inline-grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: var(--white); }
.icon-button:hover { border-color: var(--cyan); color: #007eae; }

/* Header and hero */
.site-header { position: fixed; z-index: 20; inset: 0 0 auto; color: var(--white); transition: background .25s ease, box-shadow .25s ease, color .25s ease; }
.site-header.scrolled { color: var(--navy); background: rgba(255,255,255,.96); box-shadow: 0 6px 24px rgba(11,31,58,.09); backdrop-filter: blur(14px); }
.header-inner { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 11px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: 0; }

.brand-mark { position: relative; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.48); border-radius: 50% 50% 4px 50%; color: var(--cyan); overflow: hidden; background: rgba(255,255,255,.06); }

.scrolled .brand-mark { border-color: #cdebf5; }
.brand-name { display: flex; flex-direction: column; font-size: 15px; line-height: 1.02; }
.brand-name small { margin-top: 5px; color: currentColor; font-family: 'Tajawal', sans-serif; font-size: 9px; font-weight: 600; letter-spacing: .18em; opacity: .68; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: clamp(13px, 1.8vw, 24px); }
.nav-links a { font-size: 13px; font-weight: 600; opacity: .9; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.header-cta { min-height: 42px; padding: 0 16px; font-size: 13px; }
.mobile-menu { display: none; }
.hero { position: relative; display: flex; min-height: min(790px, 100svh); align-items: center; overflow: hidden; color: var(--white); background: var(--navy); }
.hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; transform: scale(1.04); animation: hero-drift 18s ease-in-out infinite alternate; }
.hero::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,19,37,.94) 0%, rgba(6,26,48,.84) 43%, rgba(6,26,48,.32) 100%), linear-gradient(0deg, rgba(5,19,37,.65), transparent 50%); content: ''; }
.hero-grid { position: absolute; z-index: 1; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 78px 78px; mask-image: linear-gradient(90deg, #000, transparent 72%); }
.hero-content { position: relative; z-index: 2; padding-top: 100px; }
.hero-copy { max-width: 720px; animation: rise-in .85s both; }
.hero .eyebrow { color: #8ee2ff; }
.hero h1 { max-width: 720px; margin: 22px 0 18px; font-family: 'Space Grotesk', sans-serif; font-size: clamp(44px, 6.5vw, 78px); line-height: .99; letter-spacing: 0; }
.hero-copy > p { max-width: 620px; margin: 0; color: rgba(255,255,255,.78); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-metrics { display: flex; flex-wrap: wrap; gap: 0; margin-top: 54px; border-top: 1px solid rgba(255,255,255,.22); padding-top: 22px; }
.hero-metric { min-width: 155px; padding: 0 24px; border-inline-start: 1px solid rgba(255,255,255,.23); }
.hero-metric:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hero-metric strong { display: block; color: var(--white); font-family: 'Space Grotesk', sans-serif; font-size: 23px; }
.hero-metric span { color: rgba(255,255,255,.65); font-size: 12px; }
.hero-scroll { position: absolute; z-index: 2; inset-inline-end: max(24px, calc((100vw - 1160px)/2)); bottom: 46px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.68); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; writing-mode: vertical-rl; }
.hero-scroll::after { width: 1px; height: 42px; background: var(--cyan); content: ''; }

/* Trust and content sections */
.trust-strip { border-bottom: 1px solid var(--line); background: #fff; }
.trust-inner { display: grid; min-height: 102px; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 20px; }
.trust-item { display: flex; align-items: center; justify-content: center; gap: 11px; color: #526575; font-size: 14px; font-weight: 700; }
.trust-item i { color: #008dbd; }
.section { padding: 108px 0; }
.about-grid { display: grid; grid-template-columns: 1fr .95fr; align-items: center; gap: clamp(40px, 8vw, 102px); }
.about-media { position: relative; min-height: 470px; }
.about-image { position: absolute; inset: 0 36px 34px 0; width: calc(100% - 36px); height: calc(100% - 34px); border-radius: var(--radius); object-fit: cover; }
.about-accent { position: absolute; inset: auto 0 0 auto; display: flex; width: 184px; min-height: 145px; flex-direction: column; justify-content: center; border: 8px solid white; border-radius: var(--radius); padding: 20px; color: var(--white); background: var(--navy); }
.about-accent strong { color: #72d7fa; font-family: 'Space Grotesk', sans-serif; font-size: 36px; }
.about-accent span { font-size: 13px; line-height: 1.35; }
.about-copy h2 { margin: 14px 0 16px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: clamp(32px, 4vw, 47px); line-height: 1.08; }
.about-copy > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px 12px; margin: 27px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; gap: 9px; color: var(--navy); font-size: 14px; font-weight: 700; }
.check-list i { color: #009ecb; }
.services-section { background: var(--paper); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-card { position: relative; min-height: 231px; overflow: hidden; border: 1px solid #e4ebef; border-radius: var(--radius); padding: 27px; background: var(--white); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.service-card:hover { transform: translateY(-5px); border-color: #b8eafa; box-shadow: 0 18px 36px rgba(11,31,58,.08); }
.service-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 5px; color: #008fc3; background: #e9f8fd; }
.service-card h3 { margin: 20px 0 8px; color: var(--navy); font-size: 19px; }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.service-index { position: absolute; inset-inline-end: 24px; top: 27px; color: #aab9c2; font-family: 'Space Grotesk', sans-serif; font-size: 13px; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.why-item { display: flex; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line); padding: 22px 0; }
.why-item:first-child, .why-item:nth-child(2) { border-top: 1px solid var(--line); }
.why-icon { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 50%; color: #008fbf; background: #e8f8fd; }
.why-item h3 { margin: 2px 0 5px; color: var(--navy); font-size: 17px; }
.why-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.projects-section { color: var(--white); background: var(--navy); }
.projects-section .eyebrow { color: #89e1ff; }
.projects-section .section-heading h2 { color: var(--white); }
.projects-section .section-heading p { color: rgba(255,255,255,.65); }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 220px; gap: 12px; }
.project-card { position: relative; grid-column: span 4; overflow: hidden; border-radius: 5px; color: var(--white); cursor: pointer; text-align: left; }
.project-card:nth-child(1), .project-card:nth-child(4) { grid-column: span 5; }
.project-card:nth-child(2), .project-card:nth-child(5) { grid-column: span 4; }
.project-card:nth-child(3) { grid-column: span 3; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project-card::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,18,34,.88), transparent 66%); content: ''; transition: background .25s; }
.project-card:hover img { transform: scale(1.06); }
.project-meta { position: absolute; z-index: 1; inset: auto 20px 19px; }
.project-meta small { color: #80ddfa; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.project-meta strong { display: block; margin-top: 4px; font-size: 18px; }
.project-open { position: absolute; z-index: 2; inset-inline-end: 16px; top: 16px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; opacity: 0; transition: opacity .2s, transform .2s; }
.project-card:hover .project-open { transform: translateY(0); opacity: 1; }
.stats-band { padding: 56px 0; color: var(--white); background: #073151; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid-two { max-width: 760px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: auto; }
.stat { border-inline-start: 1px solid rgba(255,255,255,.2); padding: 4px 25px; text-align: center; }
.stat:first-child { border: 0; }
.stat strong { display: block; color: #83dffa; font-family: 'Space Grotesk', sans-serif; font-size: 42px; }
.stat span { color: rgba(255,255,255,.7); font-size: 14px; }
.steps-section { background: var(--paper); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding: 0 26px; }
.step:first-child { padding-inline-start: 0; }
.step:not(:last-child)::after { position: absolute; top: 23px; inset-inline-end: -10px; width: 50px; border-top: 1px dashed #9bb1bf; content: ''; }
.step-number { display: grid; width: 47px; height: 47px; place-items: center; border: 1px solid #b9dfea; border-radius: 50%; color: #007fae; background: var(--white); font-family: 'Space Grotesk', sans-serif; font-size: 15px; }
.step h3 { margin: 21px 0 7px; color: var(--navy); font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.reviews-section { overflow: hidden; }
.review-layout { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: 70px; }
.review-panel { position: relative; min-height: 270px; border: 1px solid var(--line); border-radius: var(--radius); padding: 35px; background: var(--white); box-shadow: 0 15px 42px rgba(11,31,58,.06); }
.quote-mark { color: var(--cyan); font-family: Georgia, serif; font-size: 55px; line-height: .7; }
.review-quote { min-height: 86px; margin: 18px 0 22px; color: var(--navy); font-size: 20px; line-height: 1.5; }
.review-person { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.review-person strong { display: block; color: var(--navy); }
.review-person span { color: var(--muted); font-size: 13px; }
.review-controls { display: flex; gap: 8px; }
.faq-section { background: var(--paper); }
.faq-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 80px; }
.faq-list { border-top: 1px solid #dce5ea; }
.faq-item { border-bottom: 1px solid #dce5ea; }
.faq-item summary { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; color: var(--navy); font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { flex: 0 0 auto; color: #008dbd; transition: transform .2s; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { margin: -2px 0 21px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.contact-section { position: relative; overflow: hidden; color: var(--white); background: var(--navy); }
.contact-section::after { position: absolute; inset: 0 0 0 auto; width: 48%; background: radial-gradient(ellipse at 80% 45%, rgba(0,168,232,.16), transparent 63%); content: ''; pointer-events: none; }
.contact-section .eyebrow { color: #84dffa; }
.contact-section .section-heading h2 { color: var(--white); }
.contact-section .section-heading p { color: rgba(255,255,255,.68); }
.contact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.contact-details { display: grid; gap: 21px; align-content: start; }
.contact-detail { display: flex; align-items: center; gap: 14px; }
.contact-detail i { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #7ddcf7; }
.contact-detail span { display: block; color: rgba(255,255,255,.55); font-size: 12px; }
.contact-detail strong { display: block; margin-top: 3px; font-size: 15px; font-weight: 600; }
.contact-unavailable { align-self: start; border: 1px solid rgba(255,255,255,.22); border-inline-start: 3px solid var(--orange); border-radius: 4px; padding: 19px 20px; background: rgba(255,255,255,.06); }
.contact-unavailable strong { display: block; color: white; font-size: 15px; }
.contact-unavailable p { margin: 7px 0 0; color: rgba(255,255,255,.7); font-size: 13px; line-height: 1.55; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: rgba(255,255,255,.77); font-size: 12px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; border: 1px solid rgba(255,255,255,.22); border-radius: 4px; outline: 0; padding: 11px 13px; color: white; background: rgba(255,255,255,.07); font-size: 14px; }
.field select option { color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cyan); }
.contact-form .button { justify-self: start; }
.site-footer { padding: 54px 0 22px; color: rgba(255,255,255,.68); background: #07182c; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; padding-bottom: 42px; }
.footer-grid .brand { color: white; }
.footer-about { max-width: 275px; margin: 18px 0 0; font-size: 13px; line-height: 1.7; }
.footer-col h3 { margin: 3px 0 16px; color: white; font-size: 14px; }
.footer-col a { display: block; width: fit-content; margin-top: 10px; font-size: 13px; transition: color .2s; }
.footer-col a:hover { color: #71d9f7; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; font-size: 11px; }
.whatsapp-float, .back-top { position: fixed; z-index: 18; display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 50%; color: white; box-shadow: 0 8px 25px rgba(0,0,0,.2); }
.whatsapp-float { inset-inline-end: 24px; bottom: 24px; background: #18b86a; }
.back-top { inset-inline-start: 24px; bottom: 24px; color: var(--navy); background: white; opacity: 0; pointer-events: none; transition: opacity .2s; }
.back-top.visible { opacity: 1; pointer-events: auto; }

/* Admin */
.admin-body { min-height: 100vh; background: #f1f5f8; }
.admin-header { position: sticky; z-index: 10; top: 0; display: flex; min-height: 68px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 28px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.admin-header .brand { color: var(--navy); }
.admin-actions { display: flex; align-items: center; gap: 10px; }
.logout-form { margin: 0; }
.admin-shell { display: grid; min-height: calc(100vh - 68px); grid-template-columns: 232px minmax(0, 1fr); }
.admin-sidebar { border-inline-end: 1px solid var(--line); padding: 24px 15px; background: #fff; }
.admin-sidebar-label { margin: 3px 12px 14px; color: #8b9aa5; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav button { display: flex; min-height: 42px; align-items: center; gap: 11px; border: 0; border-radius: 4px; padding: 0 12px; color: #526575; background: transparent; font-size: 13px; font-weight: 600; text-align: left; }
.admin-nav button:hover, .admin-nav button.active { color: #007ba8; background: #eaf8fc; }
.admin-main { width: min(100%, 1000px); margin: 0 auto; padding: 38px clamp(20px, 4vw, 56px) 70px; }
.admin-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-title h1 { margin: 0 0 5px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 28px; }
.admin-title p { margin: 0; color: var(--muted); font-size: 14px; }
.account-panel { margin-top: 17px; border: 1px solid var(--line); border-radius: 6px; padding: 25px; background: white; box-shadow: 0 8px 28px rgba(11,31,58,.035); }
.account-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.account-heading h2 { margin: 11px 0 5px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 21px; }
.account-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.account-heading p strong { color: var(--navy); }
.account-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 14px; }
.account-form > .button { justify-self: start; }
.password-change-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.user-list-wrap { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 18px; }
.user-list-wrap h3 { margin: 0 0 10px; color: var(--navy); font-size: 14px; }
.user-list { display: grid; }
.user-row { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #edf1f4; }
.user-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.user-avatar { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #007fae; background: #e8f8fd; font-weight: 800; }
.user-identity strong, .user-identity span { display: block; overflow-wrap: anywhere; }
.user-identity strong { color: var(--navy); font-size: 13px; }
.user-identity strong small { color: #71818c; font-size: 11px; font-weight: 500; }
.user-identity div > span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.user-current { color: #71818c; font-size: 11px; }
.user-delete { flex: 0 0 38px; color: #a53d3d; }
.user-list-loading, .user-list-error { color: var(--muted); font-size: 13px; }
.user-list-error { color: #a53d3d; }
.editor-panel { border: 1px solid var(--line); border-radius: 6px; padding: 26px; background: white; box-shadow: 0 8px 28px rgba(11,31,58,.035); }
.editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.editor-field { display: grid; gap: 7px; }
.editor-field.full { grid-column: 1 / -1; }
.editor-field label { color: #3d5060; font-size: 12px; font-weight: 700; }
.editor-field input, .editor-field textarea, .editor-field select { width: 100%; min-height: 43px; border: 1px solid #d8e2e8; border-radius: 4px; outline: 0; padding: 10px 12px; color: var(--ink); background: #fff; font-size: 14px; }
.editor-field textarea { min-height: 108px; resize: vertical; }
.editor-field input:focus, .editor-field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,168,232,.1); }
.editor-help { color: #82919b; font-size: 11px; }
.editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin: 25px -26px -26px;         /* يمتد ليغطي حدود البطاقة */
  padding: 14px 26px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -10px 24px rgba(11, 31, 58, .06);
  border-radius: 0 0 6px 6px;
}
.editor-footer span { color: var(--muted); font-size: 12px; }
.repeater-list { display: grid; gap: 12px; }
.repeat-card { border: 1px solid var(--line); border-radius: 5px; padding: 17px; background: #fbfdfe; }
.repeat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.repeat-heading strong { color: var(--navy); font-size: 14px; }
.repeat-tools { display: flex; gap: 6px; }
.repeat-tools button { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: #506474; background: white; }
.repeat-tools button:hover { color: #c33636; border-color: #f2b6b6; }
.repeat-card .editor-fields { gap: 12px; }
.repeat-image { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.repeat-image input[type=file] { width: 90px; font-size: 11px; }
.project-admin-image { width: 100%; height: 115px; margin-top: 10px; border-radius: 4px; object-fit: cover; background: #e7eef2; }
.add-button { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; border: 1px dashed #92becd; border-radius: 4px; padding: 0 15px; color: #007fae; background: #f5fcfe; font-size: 13px; font-weight: 700; }
.admin-note { border-inline-start: 3px solid var(--cyan); margin: 0 0 20px; padding: 12px 14px; color: #516573; background: #effaff; font-size: 13px; line-height: 1.55; }
.toast { position: fixed; z-index: 100; inset-inline-end: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; border-radius: 5px; padding: 14px 18px; color: white; background: #153f52; box-shadow: var(--shadow); animation: rise-in .25s both; }
.toast.error { background: #a52b2b; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(4,15,28,.72); backdrop-filter: blur(9px); animation: fade-in .2s both; }
.project-modal { position: relative; display: grid; width: min(920px, 100%); max-height: min(680px, 90vh); grid-template-columns: 1.15fr .85fr; overflow: auto; border-radius: 7px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.3); animation: rise-in .3s both; }
.project-modal > img { width: 100%; height: 100%; min-height: 400px; object-fit: cover; }
.modal-copy { align-self: center; padding: 38px; }
.modal-copy h2 { margin: 12px 0; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 30px; line-height: 1.1; }
.modal-copy p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.modal-details { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.modal-details span { color: var(--muted); font-size: 11px; }
.modal-details strong { display: block; margin-top: 4px; color: var(--navy); font-size: 14px; }
.modal-close { position: absolute; z-index: 2; inset-inline-end: 12px; top: 12px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; color: var(--navy); background: white; box-shadow: 0 3px 14px rgba(0,0,0,.15); }
.page-skeleton { display: grid; min-height: 100vh; align-content: start; gap: 14px; padding: 20vh 10vw; }
.page-skeleton span { height: 22px; border-radius: 4px; background: linear-gradient(90deg,#edf2f5,#f8fafb,#edf2f5); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.page-skeleton span:first-child { width: 45%; height: 48px; }
.page-skeleton span:nth-child(2) { width: 78%; }
.page-skeleton span:nth-child(3) { width: 60%; }
.login-wrap { display: grid; min-height: 100vh; align-content: center; justify-items: center; padding: 32px 20px; background: radial-gradient(ellipse at 50% 0%, #dff5fc 0%, #f1f5f8 54%, #e8eef2 100%); }
.login-brand { margin-bottom: 25px; color: var(--navy); }
.login-brand .brand-mark { border-color: #c5e7f0; }
.login-panel { width: min(100%, 440px); border: 1px solid #e0e8ed; border-radius: 6px; padding: 34px; background: white; box-shadow: 0 20px 60px rgba(11,31,58,.1); }
.login-panel h1 { margin: 12px 0 6px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 28px; line-height: 1.15; }
.login-description { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 5px; color: #405565; font-size: 12px; font-weight: 700; }
.login-form input { min-height: 45px; border: 1px solid #d8e2e8; border-radius: 4px; outline: none; padding: 10px 12px; color: var(--ink); background: white; font-size: 14px; }
.login-form input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,168,232,.1); }
.login-form .button { width: 100%; margin-top: 13px; }
.login-form .button:disabled, .login-form input:disabled { cursor: not-allowed; opacity: .5; }
.login-alert { margin: 18px 0; border: 1px solid #f0d3a0; border-radius: 4px; padding: 12px; color: #6e4b13; background: #fff8e9; font-size: 13px; line-height: 1.5; }
.login-home { display: block; margin-top: 22px; color: #007fae; font-size: 13px; text-align: center; }
.login-footnote { margin: 18px 0 0; color: #72828e; font-size: 11px; text-align: center; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-motion *, .no-motion *::before, .no-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }

@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-drift { to { transform: scale(1.1) translateX(-1.5%); } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 980px) {
  .nav-links { gap: 13px; }
  .nav-links a { font-size: 12px; }
  .header-inner { gap: 14px; }
  .header-cta { padding: 0 12px; }
  .about-grid { gap: 45px; }
  .review-layout, .faq-layout, .contact-grid { gap: 45px; }
  .footer-grid { gap: 28px; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 36px, 600px); }
  .header-inner { min-height: 70px; }
  .mobile-menu { display: inline-grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; color: currentColor; background: transparent; }
  .scrolled .mobile-menu { border-color: var(--line); }
  .nav-links { position: absolute; inset: 70px 0 auto; display: none; align-items: stretch; gap: 0; border-top: 1px solid var(--line); padding: 10px 18px 18px; color: var(--navy); background: white; box-shadow: 0 12px 18px rgba(11,31,58,.1); }
  .nav-links.open { display: grid; }
  .nav-links a { border-bottom: 1px solid #edf1f4; padding: 12px 2px; font-size: 14px; }
  .header-cta { display: none; }
  .hero { min-height: 760px; min-height: min(820px, 100svh); }
  .hero::after { background: linear-gradient(90deg, rgba(5,19,37,.92), rgba(6,26,48,.56)), linear-gradient(0deg, rgba(5,19,37,.72), transparent 55%); }
  .hero h1 { font-size: clamp(42px, 11vw, 66px); }
  .hero-copy > p { font-size: 16px; }
  .hero-metrics { margin-top: 38px; }
  .hero-metric { min-width: 33.33%; padding: 0 12px; }
  .hero-metric strong { font-size: 19px; }
  .hero-metric span { font-size: 10px; }
  .hero-scroll { display: none; }
  .trust-inner { grid-template-columns: 1fr 1fr; gap: 0; padding: 17px 0; }
  .trust-item { justify-content: flex-start; padding: 10px 0; font-size: 12px; }
  .section { padding: 76px 0; }
  .section-heading { margin-bottom: 29px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-media { min-height: 380px; order: 2; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .service-card { min-height: 220px; padding: 20px; }
  .service-card h3 { font-size: 16px; }
  .service-card p { font-size: 13px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-item:nth-child(2) { border-top: 0; }
  .project-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; gap: 9px; }
  .project-card, .project-card:nth-child(n) { grid-column: span 1; }
  .project-card:first-child { grid-column: span 2; }
  .project-meta { inset-inline: 12px; bottom: 13px; }
  .project-meta strong { font-size: 15px; }
  .project-meta small { font-size: 9px; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat strong { font-size: 34px; }
  .steps-grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .step, .step:first-child { padding: 0 12px; }
  .step:nth-child(odd) { padding-inline-start: 0; }
  .step:not(:last-child)::after { display: none; }
  .review-layout, .faq-layout, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .review-panel { padding: 25px; }
  .review-quote { font-size: 18px; }
  .faq-layout { gap: 8px; }
  .contact-grid { gap: 35px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .admin-header { padding: 0 15px; }
  .admin-header .brand-name { font-size: 13px; }
  .admin-header .brand-mark { width: 32px; height: 32px; }
  .admin-actions .button { min-height: 38px; padding: 0 10px; font-size: 12px; }
  .admin-shell { display: block; }
  .admin-sidebar { position: sticky; z-index: 8; top: 68px; overflow-x: auto; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .admin-sidebar-label { display: none; }
  .admin-nav { display: flex; width: max-content; gap: 4px; }
  .admin-nav button { min-height: 38px; padding: 0 11px; white-space: nowrap; }
  .admin-main { padding: 25px 16px 50px; }
  .admin-title h1 { font-size: 23px; }
  .editor-panel { padding: 18px; }
  .editor-fields { grid-template-columns: 1fr; }
  .editor-field.full { grid-column: auto; }
  .account-panel { padding: 18px; }
  .account-form, .password-change-form { grid-template-columns: 1fr; }
  .project-modal { max-height: 92vh; grid-template-columns: 1fr; }
  .project-modal > img { height: 250px; min-height: 0; }
  .modal-copy { padding: 25px; }
  .modal-copy h2 { font-size: 25px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 41px; }
  .hero-actions .button { width: 100%; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 0; }
  .contact-form { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .about-media { min-height: 310px; }
  .about-accent { width: 150px; min-height: 120px; padding: 13px; }
  .about-accent strong { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}



/* ===== Projects: زر "عرض المزيد" ===== */
.projects-actions {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}
.project-card:nth-child(6) {
  grid-column: span 3;
}

@media (max-width: 760px) {
  .projects-actions { margin-top: 26px; }
  .projects-actions .button { width: 100%; }
  .project-card:nth-child(6) { grid-column: span 1; }
}

/* ===== تمييز الحقول الفارغة عند فشل الحفظ ===== */
.editor-field input.field-error,
.editor-field textarea.field-error {
  border-color: #e74c3c !important;
  background: #fff6f6 !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, .12) !important;
}
.editor-field input.field-error:focus,
.editor-field textarea.field-error:focus {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, .22) !important;
}
.repeat-card.has-error {
  border-color: #e74c3c !important;
  background: #fffafa !important;
}
.repeat-card.has-error .repeat-heading strong {
  color: #c0392b;
}


/* ===== زر العودة للأعلى في لوحة الإدارة ===== */
.admin-back-top {
  position: fixed;
  z-index: 15;
  inset-inline-start: 24px;
  bottom: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: white;
  box-shadow: 0 8px 24px rgba(11, 31, 58, .15);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.admin-back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.admin-back-top:hover {
  border-color: var(--cyan);
  color: #007eae;
}



/* ===== شعار الشركة (صورة داخل brand-mark) ===== */
.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  z-index: 1;
  border-radius: inherit;
  background:#fff;
}



/* ===== شعار الشركة (صورة داخل brand-mark) ===== */
.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
 /* padding: 3px;*/
  background: transparent;
  z-index: 1;
  border-radius: inherit;
  background:#fff;
}
.brand-mark.has-image {
  background: transparent;
}