:root {
  --midnight: #031d38;
  --navy: #06366b;
  --blue: #0d5a8e;
  --teal: #00aaa8;
  --teal-dark: #007d7b;
  --aqua: #24d0c4;
  --ice: #f4f8fa;
  --white: #fff;
  --ink: #152a3d;
  --muted: #64748b;
  --line: #dbe7ec;
  --shadow: 0 20px 55px rgba(3, 29, 56, .12);
  --radius: 22px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: rtl;
  color: var(--ink);
  background: var(--white);
  font-family: "Cairo", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .6em; color: var(--midnight); font-family: "Tajawal", "Cairo", sans-serif; line-height: 1.25; }
p { margin: 0 0 1.25em; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; }
.screen-reader-text { position: absolute; overflow: hidden; width: 1px; height: 1px; margin: -1px; clip: rect(0,0,0,0); }
:focus-visible { outline: 3px solid rgba(0, 170, 168, .42); outline-offset: 3px; }

.topbar { color: #dcecf2; background: var(--midnight); border-bottom: 1px solid rgba(255,255,255,.1); font-size: 12px; }
.topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar-message, .topbar-contact, .topbar-contact a { display: flex; align-items: center; gap: 8px; }
.topbar-contact { gap: 24px; }
.topbar .icon { width: 16px; height: 16px; color: var(--aqua); }
.whatsapp-text { color: var(--aqua); }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(3,29,56,.08); backdrop-filter: blur(14px); transition: box-shadow .25s ease; }
.admin-bar .site-header { top: 32px; }
.site-header.scrolled { box-shadow: 0 10px 35px rgba(3,29,56,.1); }
.header-inner { min-height: 88px; display: flex; align-items: center; gap: 28px; }
.brand-wrap { width: 230px; flex: 0 0 230px; }
.site-logo, .custom-logo { width: 230px; max-height: 62px; object-fit: contain; }
.site-logo-link, .custom-logo-link { display: inline-flex; }
.site-navigation { margin-inline-start: auto; }
.primary-menu { display: flex; align-items: center; gap: 3px; padding: 0; margin: 0; list-style: none; }
.primary-menu li { position: relative; }
.primary-menu a { display: flex; padding: 14px 12px; color: #263c50; font-size: 13px; font-weight: 700; white-space: nowrap; border-radius: 9px; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--teal-dark); background: #eef9f9; }
.primary-menu .sub-menu { position: absolute; top: 100%; right: 0; min-width: 240px; margin: 0; padding: 10px; list-style: none; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s ease; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu a { padding: 10px 12px; }
.menu-toggle { display: none; color: var(--midnight); border: 0; background: transparent; padding: 7px; }
.menu-close-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-close-icon { display: block; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 49px; padding: 11px 22px; border: 1px solid var(--teal); border-radius: 8px; color: white; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); box-shadow: 0 10px 24px rgba(0,170,168,.2); font-size: 13px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,170,168,.28); }
.button-small { min-height: 43px; padding: 8px 15px; white-space: nowrap; }
.button-ghost { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.38); box-shadow: none; }
.button-ghost:hover { background: rgba(255,255,255,.14); }
.button-wide { width: 100%; }

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 690px; color: white; background:
    linear-gradient(102deg, rgba(3,29,56,.98) 0%, rgba(3,29,56,.95) 47%, rgba(3,29,56,.74) 100%),
    var(--hero-image, linear-gradient(135deg, #031d38 0%, #06366b 70%, #007d7b 100%));
  background-size: cover; background-position: center; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 15% 25%, rgba(36,208,196,.18), transparent 27%), linear-gradient(118deg, transparent 0 68%, rgba(0,170,168,.11) 68% 69%, transparent 69%); }
.hero::after { content: "M"; position: absolute; z-index: -1; left: 3%; top: 50%; transform: translateY(-51%); color: transparent; font-family: Arial, sans-serif; font-size: min(45vw, 650px); font-weight: 900; line-height: 1; -webkit-text-stroke: 2px rgba(36,208,196,.1); }
.hero-grid-pattern { position: absolute; z-index: -1; inset: 0; opacity: .17; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to left, black, transparent 78%); }
.hero-grid { min-height: 690px; padding-block: 76px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(390px, .68fr); align-items: center; gap: 76px; }
.hero-copy { max-width: 760px; }
.eyebrow { width: fit-content; display: flex; align-items: center; gap: 9px; margin-bottom: 22px; padding: 8px 12px; color: var(--aqua); background: rgba(0,170,168,.09); border: 1px solid rgba(36,208,196,.22); border-radius: 6px; font-size: 12px; font-weight: 700; }
.hero h1 { max-width: 720px; margin-bottom: 20px; color: white; font-size: clamp(38px, 4.2vw, 68px); font-weight: 900; letter-spacing: -.03em; }
.hero-copy > p { max-width: 680px; color: #d6e4eb; font-size: 17px; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.trust-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 24px; margin-top: 34px; color: #c4d7df; font-size: 12px; }
.trust-row span { display: flex; align-items: center; gap: 8px; }
.trust-row .icon { width: 17px; height: 17px; color: var(--aqua); }

.inspection-card { color: var(--ink); background: white; padding: 29px; border: 1px solid rgba(255,255,255,.45); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.card-heading h2 { margin: 0; font-size: 23px; }
.card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.card-heading > span { padding: 5px 9px; color: var(--teal-dark); background: #e9fbfa; border-radius: 30px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.inspection-form { display: grid; gap: 13px; }
.inspection-form label { display: grid; gap: 6px; color: #344b5d; font-size: 11px; font-weight: 800; }
.inspection-form input, .inspection-form select { width: 100%; height: 48px; padding: 0 13px; color: var(--ink); background: #f8fafb; border: 1px solid #d9e4e9; border-radius: 8px; outline: 0; }
.inspection-form input:focus, .inspection-form select:focus { background: white; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,170,168,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.inspection-form small { display: block; text-align: center; color: var(--muted); font-size: 9px; }
.form-notice { margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.form-notice.success { color: #086c4c; background: #e7f8ef; border: 1px solid #b5e7cf; }
.form-notice.error { color: #9b2c2c; background: #fff1f1; border: 1px solid #ffd0d0; }

.section { padding-block: 98px; }
.sectors-section { background: var(--ice); }
.section-heading { max-width: 730px; margin: 0 auto 48px; text-align: center; }
.section-heading > span, .portfolio-panel > div > span { display: inline-block; margin-bottom: 10px; color: var(--teal-dark); font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.section-heading h2 { margin-bottom: 14px; font-size: clamp(30px, 3vw, 46px); font-weight: 900; }
.section-heading p { color: var(--muted); font-size: 14px; }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; }
.sector-card { overflow: hidden; background: white; border: 1px solid #e1e9ed; border-radius: 17px; box-shadow: 0 8px 30px rgba(3,29,56,.05); transition: transform .25s ease, box-shadow .25s ease; }
.sector-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.sector-image { position: relative; display: block; height: 218px; overflow: hidden; background: var(--navy); }
.sector-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3,29,56,.66), transparent 60%); }
.sector-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sector-card:hover .sector-image img { transform: scale(1.055); }
.sector-image span { position: absolute; z-index: 1; right: 18px; bottom: 16px; padding: 5px 9px; color: white; background: rgba(0,170,168,.9); border-radius: 5px; font-size: 9px; font-weight: 800; }
.sector-body { padding: 23px 23px 25px; }
.sector-body h2, .sector-body h3 { font-size: 20px; }
.sector-body p { min-height: 56px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.sector-body > a { display: inline-flex; align-items: center; gap: 7px; color: var(--teal-dark); font-size: 11px; font-weight: 900; }
.sector-body > a .icon { width: 16px; }

.protocol-section { position: relative; overflow: hidden; color: white; background: var(--midnight); }
.protocol-section::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0 100%, rgba(0,170,168,.2), transparent 32%); pointer-events: none; }
.protocol-section .section-heading { position: relative; z-index: 1; }
.protocol-section h2 { color: white; }
.protocol-section .section-heading p { color: #aec1cb; }
.protocol-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.protocol-card { min-height: 238px; padding: 27px 20px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.protocol-card > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 32px; color: var(--aqua); background: rgba(0,170,168,.09); border: 1px solid rgba(36,208,196,.35); border-radius: 7px; font-weight: 900; }
.protocol-card h3 { color: white; font-size: 18px; }
.protocol-card p { margin: 0; color: #9fb4bf; font-size: 11px; }

.portfolio-section { background: white; }
.portfolio-panel { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 210px; align-items: center; gap: 70px; padding: 60px 68px; color: white; background: linear-gradient(125deg, #06366b 0%, #031d38 62%, #007d7b 145%); border-radius: 24px; box-shadow: var(--shadow); }
.portfolio-panel::before { content: ""; position: absolute; width: 420px; height: 420px; left: -130px; top: -190px; border: 1px solid rgba(36,208,196,.2); border-radius: 50%; box-shadow: 0 0 0 55px rgba(36,208,196,.03), 0 0 0 110px rgba(36,208,196,.03); }
.portfolio-panel > div { position: relative; z-index: 1; }
.portfolio-panel h2 { max-width: 780px; color: white; font-size: clamp(29px, 3vw, 44px); }
.portfolio-panel p { max-width: 760px; color: #c1d2da; font-size: 13px; }
.compliance-badge { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px; text-align: center; border: 1px solid rgba(36,208,196,.5); border-radius: 50%; box-shadow: inset 0 0 0 12px rgba(0,170,168,.08); }
.compliance-badge strong { color: var(--aqua); font-family: "Tajawal", sans-serif; font-size: 42px; line-height: 1; }
.compliance-badge span { margin-top: 10px; color: #d6e4eb; font-size: 10px; }

.inner-hero { position: relative; overflow: hidden; padding-block: 92px; color: white; background: linear-gradient(120deg, #031d38, #06366b); }
.inner-hero::after { content: "M"; position: absolute; left: 4%; top: -70px; color: transparent; font: 900 280px/1 Arial; -webkit-text-stroke: 2px rgba(36,208,196,.12); }
.inner-hero .container { position: relative; z-index: 1; }
.inner-hero span { color: var(--aqua); font-size: 12px; font-weight: 900; }
.inner-hero h1 { max-width: 850px; margin: 11px 0; color: white; font-size: clamp(38px, 5vw, 64px); }
.inner-hero p { max-width: 720px; margin: 0; color: #c6d8e0; }
.content-section { padding-block: 85px; background: var(--ice); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 32px; }
.content-main, .content-aside, .content-card { padding: 38px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 8px 30px rgba(3,29,56,.05); }
.content-main > :first-child, .content-aside > :first-child { margin-top: 0; }
.content-main > :last-child, .content-aside > :last-child { margin-bottom: 0; }
.content-aside { position: sticky; top: 115px; }
.content-aside h3 { font-size: 22px; }
.content-aside p { color: var(--muted); font-size: 13px; }
.entry-content h2, .entry-content h3 { margin-top: 1.45em; }
.entry-content p, .entry-content li { color: #455b6c; }
.entry-content a { color: var(--teal-dark); text-decoration: underline; }
.entry-image { width: 100%; margin-bottom: 32px; border-radius: 13px; }
.content-card { margin-bottom: 20px; }
.content-card h2 { font-size: 27px; }
.content-card p { color: var(--muted); }
.service-list { display: grid; gap: 14px; }
.service-row { display: grid; grid-template-columns: 62px 1fr 48px; align-items: center; gap: 25px; padding: 25px 28px; background: white; border: 1px solid var(--line); border-radius: 13px; transition: .2s ease; }
.service-row:hover { transform: translateX(-4px); border-color: rgba(0,170,168,.5); box-shadow: 0 12px 30px rgba(3,29,56,.08); }
.service-row > span { display: grid; place-items: center; width: 54px; height: 54px; color: white; background: var(--navy); border-radius: 8px; font-weight: 900; }
.service-row h2 { margin: 0; font-size: 21px; }
.service-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.service-arrow { display: grid; place-items: center; width: 43px; height: 43px; color: var(--teal-dark); background: #ebf9f8; border-radius: 50%; }
.not-found { min-height: 68vh; display: grid; place-items: center; padding: 80px 0; text-align: center; background: var(--ice); }
.not-found strong { display: block; color: var(--teal); font: 900 110px/1 "Tajawal", sans-serif; }

.site-footer { padding-top: 68px; color: #afc2cc; background: #021629; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.05fr; gap: 55px; padding-bottom: 55px; }
.footer-logo { width: 230px; padding: 9px; background: white; border-radius: 9px; }
.footer-brand p { max-width: 390px; margin-top: 22px; font-size: 12px; }
.site-footer h3 { margin-bottom: 18px; color: white; font-size: 16px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 9px; font-size: 11px; }
.site-footer a:hover { color: var(--aqua); }
.footer-contact { display: flex; flex-direction: column; align-items: flex-start; }
.footer-contact > span { font-size: 10px; }
.footer-contact strong { margin: 1px 0 5px; direction: ltr; color: white; font-size: 23px; }
.footer-contact > a:not(.whatsapp-button) { color: var(--aqua); font-size: 11px; }
.whatsapp-button { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 9px 12px; color: white; background: #168c5b; border-radius: 6px; font-size: 10px; font-weight: 800; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 18px; border-top: 1px solid rgba(255,255,255,.09); font-size: 9px; }
.floating-whatsapp { position: fixed; z-index: 1100; left: 23px; bottom: 23px; display: grid; place-items: center; width: 55px; height: 55px; color: white; background: #12a267; border: 4px solid white; border-radius: 50%; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.floating-whatsapp .icon { width: 27px; height: 27px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }
.reveal:nth-child(5) { transition-delay: .24s; }
.reveal:nth-child(6) { transition-delay: .3s; }

@media (max-width: 1100px) {
  .header-inner { gap: 18px; }
  .brand-wrap, .site-logo, .custom-logo { width: 200px; }
  .primary-menu a { padding-inline: 8px; font-size: 11px; }
  .header-cta span { display: none; }
  .hero-grid { gap: 38px; }
  .protocol-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-contact { grid-column: span 3; }
}

@media (max-width: 900px) {
  .admin-bar .site-header { top: 46px; }
  .topbar-message { display: none; }
  .topbar-inner { justify-content: center; }
  .menu-toggle { display: inline-grid; place-items: center; margin-inline-start: auto; }
  .header-cta { margin-inline-start: 0; }
  .site-navigation { position: fixed; top: 127px; right: 20px; left: 20px; max-height: calc(100vh - 150px); overflow: auto; margin: 0; padding: 15px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: .2s ease; }
  .admin-bar .site-navigation { top: 173px; }
  .site-navigation.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-menu { display: grid; gap: 3px; }
  .primary-menu a { padding: 11px 13px; font-size: 13px; }
  .primary-menu .sub-menu { position: static; min-width: 0; display: block; margin: 3px 12px 7px 0; padding: 0 10px 0 0; border: 0; border-right: 2px solid var(--teal); border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .hero, .hero-grid { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 72px; }
  .hero-copy { max-width: none; }
  .inspection-card { max-width: 620px; }
  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-panel { grid-template-columns: 1fr; gap: 35px; padding: 48px; }
  .compliance-badge { width: 180px; }
  .content-layout { grid-template-columns: 1fr; }
  .content-aside { position: static; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .topbar-contact { width: 100%; justify-content: space-between; gap: 10px; }
  .topbar-contact a { font-size: 10px; }
  .header-inner { min-height: 74px; }
  .brand-wrap, .site-logo, .custom-logo { width: 164px; flex-basis: 164px; }
  .header-cta { display: none; }
  .site-navigation { top: 112px; }
  .admin-bar .site-navigation { top: 158px; }
  .hero-grid { padding-block: 55px; }
  .hero h1 { font-size: 39px; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { display: grid; }
  .trust-row { grid-template-columns: 1fr; }
  .inspection-card { padding: 22px 18px; border-radius: 15px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding-block: 72px; }
  .section-heading { margin-bottom: 35px; }
  .sector-grid, .protocol-grid { grid-template-columns: 1fr; }
  .sector-image { height: 210px; }
  .protocol-card { min-height: auto; }
  .protocol-card > span { margin-bottom: 20px; }
  .portfolio-panel { padding: 35px 23px; border-radius: 17px; }
  .compliance-badge { width: 150px; }
  .inner-hero { padding-block: 66px; }
  .content-section { padding-block: 55px; }
  .content-main, .content-aside, .content-card { padding: 25px 20px; }
  .service-row { grid-template-columns: 48px 1fr; gap: 15px; padding: 19px 16px; }
  .service-row > span { width: 45px; height: 45px; }
  .service-arrow { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 38px 24px; }
  .footer-brand, .footer-contact { grid-column: span 2; }
  .footer-bottom { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
