/*
Theme Name: DMG 2026
Theme URI: https://www.dmg-eg.com/
Author: DMG - Design & Project Management Group
Description: Custom corporate theme for DMG's MEP Consultancy and BIM & Digital Engineering website.
Version: 0.4.0
Requires at least: 6.8
Requires PHP: 8.1
Text Domain: dmg-2026
*/

:root {
    --dmg-navy: #2a3890;
    --dmg-navy-deep: #101b48;
    --dmg-blue: #4053a5;
    --dmg-blue-soft: #eaf0ff;
    --dmg-red: #ed1c23;
    --dmg-ink: #172033;
    --dmg-muted: #667085;
    --dmg-line: #dbe2ef;
    --dmg-soft: #f5f8fc;
    --dmg-white: #ffffff;
    --dmg-max: 1240px;
    --dmg-radius: 16px;
    --dmg-shadow: 0 22px 60px rgba(16, 27, 72, .12);
    --dmg-header-height: 86px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--dmg-ink);
    background: var(--dmg-white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.58;
    -webkit-font-smoothing: antialiased;
}
body.admin-bar .dmg-site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(237, 28, 35, .45); outline-offset: 3px; }

.screen-reader-text,
.dmg-skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.dmg-skip-link:focus {
    z-index: 100000;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    clip: auto;
    padding: 10px 16px;
    color: var(--dmg-navy-deep);
    background: #fff;
    box-shadow: var(--dmg-shadow);
}

.dmg-shell { width: min(var(--dmg-max), calc(100% - 48px)); margin-inline: auto; }

/* Header */
.dmg-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--dmg-header-height);
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid rgba(42,56,144,.12);
    backdrop-filter: blur(12px);
}
.dmg-site-header__inner {
    display: grid;
    grid-template-columns: minmax(300px, 390px) 1fr;
    gap: 40px;
    align-items: center;
    height: 100%;
}
.dmg-brand { display: inline-flex; align-items: center; width: fit-content; }
.dmg-logo { width: min(355px, 100%); max-height: 62px; object-fit: contain; object-position: left center; }
.dmg-nav { justify-self: end; }
.dmg-nav__list,
.dmg-nav .menu {
    display: flex;
    align-items: center;
    gap: clamp(18px, 1.8vw, 30px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.dmg-nav__item,
.dmg-nav .menu-item { position: relative; }
.dmg-nav a {
    position: relative;
    display: block;
    padding: 32px 0;
    color: var(--dmg-navy-deep);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: .015em;
}
.dmg-nav > ul > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 22px;
    height: 2px;
    background: var(--dmg-red);
    transition: right .18s ease;
}
.dmg-nav > ul > li:hover > a::after,
.dmg-nav > ul > li:focus-within > a::after,
.dmg-nav > ul > .current-menu-item > a::after,
.dmg-nav > ul > .current-menu-ancestor > a::after { right: 0; }
.dmg-nav__submenu,
.dmg-nav .sub-menu {
    position: absolute;
    top: calc(100% - 8px);
    left: -18px;
    min-width: 220px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--dmg-line);
    box-shadow: var(--dmg-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.dmg-nav__item:hover > .dmg-nav__submenu,
.dmg-nav__item:focus-within > .dmg-nav__submenu,
.dmg-nav .menu-item:hover > .sub-menu,
.dmg-nav .menu-item:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dmg-nav__submenu a,
.dmg-nav .sub-menu a { padding: 10px 12px; color: var(--dmg-ink); font-size: 12px; font-weight: 650; }
.dmg-nav__submenu a:hover,
.dmg-nav__submenu a:focus,
.dmg-nav .sub-menu a:hover,
.dmg-nav .sub-menu a:focus { color: var(--dmg-navy); background: var(--dmg-blue-soft); }
.dmg-nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.dmg-nav-toggle__bar { display: block; width: 100%; height: 2px; margin: 5px 0; background: var(--dmg-navy-deep); }

/* Hero — v0.2 visual language, with the locked final copy. */
.dmg-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 650px;
    display: grid;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(100deg, rgba(7,22,64,.99) 0%, rgba(12,35,89,.96) 43%, rgba(9,28,75,.40) 73%, rgba(8,22,58,.16) 100%),
        var(--dmg-home-hero-image) center right / cover no-repeat,
        #142b69;
}
.dmg-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .19;
    background-image:
        linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.9) 38%, transparent 76%);
}
.dmg-hero__inner { min-height: 650px; display: flex; align-items: center; }
.dmg-hero__copy { position: relative; z-index: 2; width: min(820px, 72%); padding: 84px 0; }
.dmg-hero__eyebrow,
.dmg-section-kicker {
    margin: 0 0 13px;
    color: var(--dmg-red);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.dmg-hero__eyebrow { color: #c9d5ff; }
.dmg-hero h1 { margin: 0; max-width: 900px; font-size: clamp(44px, 5.25vw, 72px); font-weight: 780; line-height: 1.015; letter-spacing: -.045em; }
.dmg-hero h1 span { display: block; }
.dmg-hero h1 span + span { margin-top: .08em; }
.dmg-red-rule { display: block; width: 52px; height: 3px; margin: 25px 0 17px; background: var(--dmg-red); }
.dmg-hero__mantra { margin: 0 0 28px; color: rgba(255,255,255,.94); font-size: clamp(19px, 1.7vw, 24px); font-weight: 400; }

.dmg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 48px;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .025em;
    transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}
.dmg-button--hero { color: #fff; border-color: rgba(255,255,255,.78); background: rgba(9,27,70,.34); }
.dmg-button--hero:hover,
.dmg-button--hero:focus { color: var(--dmg-navy-deep); background: #fff; border-color: #fff; transform: translateY(-1px); }
.dmg-button--primary { color: #fff; background: var(--dmg-navy); }
.dmg-button--primary:hover,
.dmg-button--primary:focus { background: var(--dmg-navy-deep); transform: translateY(-1px); }
.dmg-button--light { color: var(--dmg-navy-deep); background: #fff; }
.dmg-button--light:hover,
.dmg-button--light:focus { color: #fff; background: var(--dmg-red); transform: translateY(-1px); }

/* Credibility */
.dmg-credibility { background: #fff; border-bottom: 1px solid var(--dmg-line); }
.dmg-stats { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); }
.dmg-stat { position: relative; display: grid; gap: 4px; padding: 28px 20px 26px; text-align: left; }
.dmg-stat:first-child { padding-left: 0; }
.dmg-stat:not(:last-child)::after { content: ""; position: absolute; top: 26px; right: 0; width: 1px; height: 54px; background: var(--dmg-line); }
.dmg-stat strong { color: var(--dmg-navy); font-size: 27px; font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.dmg-stat span { color: var(--dmg-muted); font-size: 11px; font-weight: 700; line-height: 1.35; }

/* Global sections */
.dmg-section { padding: 86px 0; }
.dmg-section--soft { background: var(--dmg-soft); }
.dmg-section-heading { margin-bottom: 34px; }
.dmg-section-heading--center { max-width: 780px; margin-inline: auto; text-align: center; }
.dmg-section-heading--split { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,.65fr); gap: 48px; align-items: end; }
.dmg-section-heading h2,
.dmg-about-grid h2,
.dmg-contact-band h2 { margin: 7px 0 0; color: var(--dmg-navy-deep); font-size: clamp(31px, 3.2vw, 48px); font-weight: 780; line-height: 1.06; letter-spacing: -.038em; }
.dmg-section-intro { margin: 0; color: var(--dmg-muted); font-size: 17px; }
.dmg-section-kicker--light { color: #d7e0ff; }
.dmg-copy { color: var(--dmg-ink); }
.dmg-copy > p:first-child { margin-top: 0; color: var(--dmg-muted); font-size: 18px; }
.dmg-text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--dmg-navy); font-size: 12px; font-weight: 850; letter-spacing: .025em; }
.dmg-text-link span { color: var(--dmg-red); font-size: 17px; }

/* Services */
.dmg-services { background: #fff; }
.dmg-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.dmg-service-card { min-width: 0; min-height: 385px; display: grid; grid-template-columns: minmax(0,1fr) minmax(210px,.92fr); overflow: hidden; color: #fff; background: var(--dmg-navy-deep); border-radius: var(--dmg-radius); box-shadow: 0 15px 34px rgba(16,27,72,.11); }
.dmg-service-card--bim { background: linear-gradient(145deg, #172761, #30439a); }
.dmg-service-card__copy { position: relative; z-index: 2; align-self: center; padding: 38px 14px 38px 38px; }
.dmg-card-index { display: block; margin: 0 0 18px; color: #b8c5ef; font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.dmg-service-card h3 { margin: 0 0 7px; font-size: 31px; line-height: 1.04; letter-spacing: -.03em; }
.dmg-service-card h3::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 14px; background: var(--dmg-red); }
.dmg-service-card__subtitle { margin: 15px 0 10px; color: #fff; font-size: 16px; font-weight: 750; }
.dmg-service-card__copy > p:not(.dmg-service-card__subtitle) { margin: 0 0 22px; color: rgba(255,255,255,.78); font-size: 14px; }
.dmg-service-card__copy > a { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 11px; font-weight: 850; }
.dmg-service-card__copy > a span { color: #ff4c52; font-size: 18px; }
.dmg-service-card__visual { position: relative; min-width: 0; overflow: hidden; background: #0b1740; }
.dmg-service-card__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--dmg-navy-deep) 0%, rgba(16,27,72,.18) 42%, rgba(16,27,72,.02) 100%); pointer-events: none; }
.dmg-service-card--bim .dmg-service-card__visual::after { background: linear-gradient(90deg, #1d2d70 0%, rgba(29,45,112,.18) 45%, rgba(29,45,112,.02) 100%); }
.dmg-service-card__visual > img { width: 100%; height: 100%; object-fit: cover; }
.dmg-service-card__evidence { position: absolute; z-index: 2; right: 12px; bottom: 10px; max-width: 82%; padding: 6px 8px; color: rgba(255,255,255,.85); background: rgba(9,19,50,.62); border: 1px solid rgba(255,255,255,.14); font-size: 9px; line-height: 1.25; }

/* About */
.dmg-about-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 78px; align-items: start; }
.dmg-fact-line { display: flex; justify-content: space-between; gap: 22px; padding: 16px 0; border-top: 1px solid var(--dmg-line); }
.dmg-fact-line span { color: var(--dmg-muted); }
.dmg-fact-line strong { color: var(--dmg-navy); text-align: right; }
.dmg-about-band .dmg-text-link { margin-top: 18px; }

/* Qualifications */
.dmg-qualifications { background: #fff; }
.dmg-qualification-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.dmg-qualification-card { position: relative; min-height: 255px; padding: 34px; overflow: hidden; background: #fff; border: 1px solid var(--dmg-line); border-radius: 12px; }
.dmg-qualification-card::after { content: ""; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: linear-gradient(var(--dmg-red) 0 20%, var(--dmg-navy) 20% 100%); }
.dmg-qualification-card__country { display: block; margin: 0 0 11px; color: var(--dmg-red); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.dmg-qualification-card h3,
.dmg-qualification-card h2 { margin: 0 0 10px; color: var(--dmg-navy-deep); font-size: 24px; line-height: 1.15; }
.dmg-qualification-card__issuer { margin: 0 0 16px; color: var(--dmg-navy); font-weight: 700; }
.dmg-qualification-card > p { color: var(--dmg-muted); }
.dmg-qualification-card__validity { margin-top: 16px; font-size: 13px; }
.dmg-qualification-grid--page { margin-top: 34px; }
.dmg-qualification-card--page { min-height: 330px; }
.dmg-qualification-card__document { margin-top: 24px; }
.dmg-qualification-card__document img { max-width: 300px; border: 1px solid var(--dmg-line); }

/* Clients */
.dmg-client-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.dmg-client-logo { display: flex; align-items: center; justify-content: center; min-height: 115px; padding: 20px; background: #fff; border: 1px solid var(--dmg-line); border-radius: 8px; }
.dmg-client-logo img { max-width: 150px; max-height: 64px; object-fit: contain; filter: grayscale(1); opacity: .72; transition: filter .18s ease, opacity .18s ease; }
.dmg-client-logo:hover img { filter: grayscale(0); opacity: 1; }

/* Contact CTA */
.dmg-contact-band { color: #fff; background: linear-gradient(110deg, var(--dmg-navy-deep), #26398c); }
.dmg-contact-band__inner { min-height: 260px; display: flex; align-items: center; justify-content: space-between; gap: 46px; padding-block: 48px; }
.dmg-contact-band h2 { max-width: 770px; color: #fff; }

/* Inner pages */
.dmg-inner-hero { position: relative; overflow: hidden; color: #fff; background: var(--dmg-navy-deep); }
.dmg-inner-hero::after { content: ""; position: absolute; inset: 0; opacity: .17; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to left, #000, transparent 76%); }
.dmg-inner-hero .dmg-shell { position: relative; z-index: 2; padding-block: 96px 88px; }
.dmg-inner-hero h1 { max-width: 920px; margin: 7px 0 15px; font-size: clamp(42px, 5vw, 68px); line-height: 1; letter-spacing: -.043em; }
.dmg-inner-hero p:not(.dmg-section-kicker) { max-width: 760px; margin: 0; color: #dce5ff; font-size: 18px; }
.dmg-inner-hero--mep { background: linear-gradient(105deg, #111d4e, #2b3d92); }
.dmg-inner-hero--bim { background: linear-gradient(105deg, #0f1a46, #31459d); }
.dmg-inner-hero--projects { background: linear-gradient(105deg, #101b48, #243784); }
.dmg-inner-hero--light { color: var(--dmg-ink); background: linear-gradient(120deg, #fff 0%, #f6f8fd 70%, #edf1fb 100%); border-bottom: 1px solid var(--dmg-line); }
.dmg-inner-hero--light::after { opacity: .06; background-image: linear-gradient(var(--dmg-navy) 1px, transparent 1px), linear-gradient(90deg, var(--dmg-navy) 1px, transparent 1px); }
.dmg-inner-hero--light h1 { color: var(--dmg-navy-deep); }
.dmg-inner-hero--light p:not(.dmg-section-kicker) { color: var(--dmg-muted); }

.dmg-entry-content { max-width: 850px; color: var(--dmg-ink); }
.dmg-entry-content--wide { max-width: 1120px; }
.dmg-entry-content > *:first-child { margin-top: 0; }
.dmg-entry-content h2 { margin: 42px 0 15px; color: var(--dmg-navy-deep); font-size: clamp(27px, 2.5vw, 38px); line-height: 1.1; }
.dmg-entry-content h3 { margin: 28px 0 10px; color: var(--dmg-navy); font-size: 22px; line-height: 1.2; }
.dmg-entry-content p,
.dmg-entry-content li { color: var(--dmg-muted); }
.dmg-entry-content a { color: var(--dmg-navy); text-decoration: underline; text-underline-offset: 3px; }
.dmg-page-intro { margin-bottom: 32px; }

/* Seeded Gutenberg structures */
.dmg-entry-content .wp-block-columns { gap: 18px; }
.dmg-entry-content .wp-block-column { min-width: 0; }
.dmg-content-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.dmg-content-cards > .wp-block-column { margin: 0; padding: 24px; background: #fff; border: 1px solid var(--dmg-line); border-radius: 10px; }
.dmg-service-page--mep .dmg-content-cards > .wp-block-column { border-top: 3px solid var(--dmg-navy); }
.dmg-service-page--bim .dmg-content-cards > .wp-block-column { border-top: 3px solid var(--dmg-blue); }
.dmg-infrastructure-band { margin: 44px 0; padding: 36px; color: #fff; background: linear-gradient(135deg, var(--dmg-navy-deep), #2b3e92); border-radius: var(--dmg-radius); }
.dmg-infrastructure-band h2,
.dmg-infrastructure-band h3 { color: #fff; }
.dmg-infrastructure-band p,
.dmg-infrastructure-band li { color: #dce5ff; }
.dmg-infrastructure-band .wp-block-columns { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.dmg-infrastructure-band .wp-block-column { margin: 0; padding: 0; background: transparent; border: 0; }
.dmg-lifecycle { margin-top: 26px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; counter-reset: steps; }
.dmg-lifecycle li { position: relative; min-height: 118px; padding: 20px; color: var(--dmg-ink); background: var(--dmg-soft); border: 1px solid var(--dmg-line); border-radius: 8px; }
.dmg-lifecycle li::before { counter-increment: steps; content: "0" counter(steps); display: block; margin-bottom: 8px; color: var(--dmg-red); font-weight: 850; font-size: 11px; letter-spacing: .1em; }
.dmg-history-timeline { margin: 30px 0 0; padding: 0; list-style: none; }
.dmg-history-timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 28px; padding: 22px 0; border-top: 1px solid var(--dmg-line); }
.dmg-history-timeline strong { color: var(--dmg-navy); font-size: 28px; line-height: 1; }
.dmg-history-timeline span { color: var(--dmg-muted); }

.dmg-about-page-grid { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr); gap: 70px; align-items: start; }
.dmg-about-identity { padding: 28px; background: var(--dmg-soft); border: 1px solid var(--dmg-line); border-radius: 10px; }
.dmg-about-identity img { width: 100%; }
.dmg-about-identity p { margin: 22px 0 0; color: var(--dmg-navy-deep); font-size: 18px; line-height: 1.8; }
.dmg-contact-grid { display: grid; grid-template-columns: minmax(0,.82fr) minmax(420px,1.18fr); gap: 72px; align-items: start; }
.dmg-contact-details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.dmg-contact-details article { min-height: 210px; padding: 28px; background: var(--dmg-soft); border: 1px solid var(--dmg-line); border-top: 3px solid var(--dmg-navy); }
.dmg-contact-details h2 { margin: 4px 0 14px; color: var(--dmg-navy-deep); font-size: 26px; }
.dmg-contact-details p { color: var(--dmg-muted); }
.dmg-contact-details__general { grid-column: 1 / -1; min-height: auto !important; }
.dmg-empty-state { padding: 38px; background: var(--dmg-soft); border: 1px dashed #b8c3d6; border-radius: 10px; }

/* Project archive */
.dmg-project-filters { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)) auto; gap: 15px; align-items: end; margin: 0 0 34px; padding: 21px; background: var(--dmg-soft); border: 1px solid var(--dmg-line); border-radius: 12px; }
.dmg-project-filters label span { display: block; margin-bottom: 7px; color: var(--dmg-muted); font-size: 11px; font-weight: 780; }
.dmg-project-filters select { width: 100%; min-height: 46px; padding: 0 12px; color: var(--dmg-ink); background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; }
.dmg-filter-actions { display: flex; align-items: center; gap: 13px; }
.dmg-filter-reset { color: var(--dmg-navy); font-size: 12px; font-weight: 800; }
.dmg-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.dmg-project-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--dmg-line); border-radius: 12px; transition: transform .18s ease, box-shadow .18s ease; }
.dmg-project-card:hover,
.dmg-project-card:focus-within { transform: translateY(-3px); box-shadow: 0 17px 42px rgba(16,32,76,.10); }
.dmg-project-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; color: #fff; background: #edf2f8; }
.dmg-project-card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.dmg-project-card:hover .dmg-project-card__media > img { transform: scale(1.018); }
.dmg-media-type-badge { position: absolute; z-index: 3; left: 12px; top: 12px; padding: 6px 8px; color: #fff; background: rgba(16,27,72,.84); border: 1px solid rgba(255,255,255,.25); border-radius: 4px; font-size: 9px; font-weight: 850; line-height: 1; letter-spacing: .07em; text-transform: uppercase; backdrop-filter: blur(5px); }
.dmg-project-card__body { padding: 23px 24px 25px; }
.dmg-project-card__body .dmg-section-kicker { margin-bottom: 8px; }
.dmg-project-card h2,
.dmg-project-card h3 { margin: 0 0 10px; color: var(--dmg-navy-deep); font-size: 23px; line-height: 1.12; letter-spacing: -.022em; }
.dmg-project-card__body > p { margin: 0 0 15px; color: var(--dmg-muted); font-size: 14px; }
.dmg-project-card__meta { padding-top: 12px; border-top: 1px solid var(--dmg-line); color: #7b8497; font-size: 12px; }
.dmg-project-link { display: inline-flex; gap: 9px; align-items: center; margin-top: 17px; color: var(--dmg-navy); font-size: 12px; font-weight: 850; }
.dmg-project-link span { color: var(--dmg-red); }
.dmg-project-fallback { position: absolute; inset: 0; overflow: hidden; color: rgba(174,197,239,.55); background: radial-gradient(circle at 78% 20%, rgba(64,83,165,.48), transparent 34%), linear-gradient(145deg, var(--dmg-navy-deep), #263d8b); }
.dmg-project-fallback::before { content: ""; position: absolute; inset: 0; opacity: .27; background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(135deg, #000, transparent 82%); }
.dmg-project-fallback svg { position: absolute; top: 4%; right: -3%; width: 78%; height: 78%; opacity: .78; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 38px; }
.nav-links .page-numbers { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 10px; border: 1px solid var(--dmg-line); border-radius: 6px; }
.nav-links .current { color: #fff; background: var(--dmg-navy); border-color: var(--dmg-navy); }

/* Project detail */
.dmg-project-single { background: #fff; }
.dmg-project-hero { color: #fff; background: var(--dmg-navy-deep); }
.dmg-project-hero__visual { position: relative; aspect-ratio: 2 / 1; max-height: 650px; overflow: hidden; }
.dmg-project-hero__visual > img { width: 100%; height: 100%; object-fit: cover; }
.dmg-project-hero__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(7,18,52,.9) 0%, rgba(7,18,52,.18) 55%, rgba(7,18,52,.02) 100%); }
.dmg-project-hero__caption { position: absolute; z-index: 2; left: 50%; bottom: clamp(26px, 5vw, 66px); transform: translateX(-50%); }
.dmg-project-caption__service { display: block; margin-bottom: 9px; color: #d5dfff; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.dmg-project-hero__caption h1 { max-width: 980px; margin: 0; color: #fff; font-size: clamp(36px, 5vw, 66px); line-height: 1.02; letter-spacing: -.04em; }
.dmg-project-hero__caption p { max-width: 820px; margin: 14px 0 0; color: rgba(255,255,255,.88); font-size: 17px; }
.dmg-project-body { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 70px; align-items: start; }
.dmg-project-sidebar { position: sticky; top: calc(var(--dmg-header-height) + 24px); align-self: start; }
.dmg-project-details,
.dmg-project-organizations dl,
.dmg-technical-facts dl { margin: 0; }
.dmg-project-details { padding: 23px; background: var(--dmg-soft); border-top: 3px solid var(--dmg-red); }
.dmg-project-details > div,
.dmg-project-organizations dl > div { padding: 13px 0; border-top: 1px solid var(--dmg-line); }
.dmg-project-details > div:first-child,
.dmg-project-organizations dl > div:first-child { padding-top: 0; border-top: 0; }
.dmg-project-details dt,
.dmg-project-organizations dt { color: var(--dmg-muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dmg-project-details dd,
.dmg-project-organizations dd { margin: 3px 0 0; color: var(--dmg-navy-deep); font-weight: 700; }
.dmg-project-organizations { margin-top: 25px; padding: 22px; border: 1px solid var(--dmg-line); }
.dmg-project-organizations h2 { margin: 0 0 17px; color: var(--dmg-navy-deep); font-size: 18px; }
.dmg-project-copy { min-width: 0; }
.dmg-project-copy__section + .dmg-project-copy__section { margin-top: 52px; }
.dmg-project-copy h2 { margin: 5px 0 17px; color: var(--dmg-navy-deep); font-size: clamp(29px, 3vw, 42px); line-height: 1.08; }
.dmg-project-lead { margin: 0; color: var(--dmg-muted); font-size: 19px; }
.dmg-technical-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.dmg-technical-facts dl > div { padding: 18px; background: var(--dmg-soft); border: 1px solid var(--dmg-line); }
.dmg-technical-facts dt { margin-bottom: 4px; color: var(--dmg-muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dmg-technical-facts dd { margin: 0; color: var(--dmg-navy-deep); font-weight: 700; }
.dmg-project-gallery__grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.dmg-project-gallery figure { margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--dmg-line); border-radius: 8px; }
.dmg-project-gallery__media { background: #eaf0f6; }
.dmg-project-gallery__media img { width: 100%; height: auto; }
.dmg-project-gallery figcaption { padding: 13px 15px; }
.dmg-project-gallery figcaption > span { color: var(--dmg-red); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dmg-project-gallery figcaption p { margin: 4px 0 0; color: var(--dmg-muted); font-size: 12px; }

/* Footer */
.dmg-site-footer { color: rgba(255,255,255,.78); background: var(--dmg-navy-deep); }
.dmg-site-footer__grid { display: grid; grid-template-columns: 1.35fr .8fr .9fr .9fr; gap: 46px; padding: 58px 0 44px; }
.dmg-footer-logo-wrap { display: inline-block; max-width: 340px; padding: 10px 12px; background: #fff; border-radius: 6px; }
.dmg-footer-logo { width: 100%; max-height: 58px; object-fit: contain; }
.dmg-site-footer__arabic { max-width: 340px; margin: 18px 0 0; color: #fff; font-size: 14px; line-height: 1.8; }
.dmg-site-footer__mantra { margin: 10px 0 0; color: #b9c6ef; }
.dmg-site-footer__section h2 { margin: 0 0 17px; color: #fff; font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dmg-footer-office { margin-bottom: 17px; }
.dmg-footer-office strong { color: #fff; }
.dmg-footer-office p,
.dmg-site-footer__section p { margin: 4px 0; font-size: 13px; }
.dmg-footer-nav { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.dmg-footer-nav a:hover,
.dmg-footer-nav a:focus,
.dmg-site-footer__section a:hover,
.dmg-site-footer__section a:focus { color: #fff; }
.dmg-footer-contact { display: inline-flex; gap: 8px; margin-top: 11px; color: #fff; font-size: 12px; font-weight: 850; }
.dmg-site-footer__bottom { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0 23px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.52); font-size: 11px; }

/* Responsive */
@media (max-width: 1120px) {
    :root { --dmg-max: 1080px; }
    .dmg-site-header__inner { grid-template-columns: minmax(270px, 330px) 1fr; gap: 24px; }
    .dmg-nav__list, .dmg-nav .menu { gap: 16px; }
    .dmg-nav a { font-size: 11px; }
    .dmg-service-card { grid-template-columns: 1fr; }
    .dmg-service-card__visual { position: absolute; right: 0; top: 0; bottom: 0; width: 45%; opacity: .62; }
    .dmg-service-card__copy { max-width: 66%; padding-right: 18px; }
    .dmg-service-card__evidence { display: none; }
}

@media (max-width: 920px) {
    body.admin-bar .dmg-site-header { top: 46px; }
    .dmg-shell { width: min(var(--dmg-max), calc(100% - 40px)); }
    .dmg-site-header__inner { grid-template-columns: 1fr auto; gap: 14px; }
    .dmg-logo { max-width: 300px; }
    .dmg-nav-toggle { display: block; justify-self: end; }
    .dmg-nav { position: absolute; top: var(--dmg-header-height); left: 0; right: 0; display: none; max-height: calc(100vh - var(--dmg-header-height)); overflow: auto; background: #fff; border-top: 1px solid var(--dmg-line); box-shadow: 0 18px 32px rgba(16,27,72,.11); }
    .dmg-nav.is-open { display: block; }
    .dmg-nav__list, .dmg-nav .menu { display: block; width: min(var(--dmg-max), calc(100% - 40px)); margin: 0 auto; padding: 14px 0 20px; }
    .dmg-nav a { padding: 13px 0; font-size: 13px; }
    .dmg-nav > ul > li > a::after { display: none; }
    .dmg-nav__submenu, .dmg-nav .sub-menu { position: static; display: block; min-width: 0; padding: 0 0 7px 18px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
    .dmg-nav__submenu a, .dmg-nav .sub-menu a { padding: 8px 0; color: var(--dmg-muted); }

    .dmg-hero { min-height: 610px; background-position: 68% center; }
    .dmg-hero__inner { min-height: 610px; }
    .dmg-hero__copy { width: 82%; padding: 70px 0; }
    .dmg-hero h1 { font-size: clamp(40px, 7.2vw, 62px); }
    .dmg-stats { grid-template-columns: repeat(3, 1fr); }
    .dmg-stat:nth-child(3)::after { display: none; }
    .dmg-stat:nth-child(-n+3) { border-bottom: 1px solid var(--dmg-line); }
    .dmg-stat:nth-child(4) { padding-left: 0; }

    .dmg-section-heading--split,
    .dmg-about-grid,
    .dmg-about-page-grid,
    .dmg-contact-grid,
    .dmg-project-body { grid-template-columns: 1fr; gap: 36px; }
    .dmg-service-grid,
    .dmg-qualification-grid { grid-template-columns: 1fr; }
    .dmg-service-card { min-height: 360px; }
    .dmg-client-grid { grid-template-columns: repeat(3, 1fr); }
    .dmg-project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dmg-project-filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dmg-project-sidebar { position: static; }
    .dmg-site-footer__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dmg-lifecycle { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dmg-content-cards,
    .dmg-infrastructure-band .wp-block-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
    :root { --dmg-header-height: 74px; }
    .dmg-shell { width: calc(100vw - 30px); }
    .dmg-logo { width: min(230px, 70vw); max-width: 230px; max-height: 48px; }
    .dmg-nav__list, .dmg-nav .menu { width: calc(100vw - 30px); }

    .dmg-hero { min-height: 575px; background-position: 63% center; }
    .dmg-hero::before { content: ""; position: absolute; inset: 0; background: rgba(7,19,55,.18); }
    .dmg-hero__inner { min-height: 575px; }
    .dmg-hero__copy { width: 100%; padding: 58px 0; }
    .dmg-hero h1 { font-size: clamp(37px, 11vw, 52px); }
    .dmg-hero__mantra { font-size: 19px; }

    .dmg-stats { grid-template-columns: repeat(2, 1fr); }
    .dmg-stat { padding: 22px 14px; }
    .dmg-stat:nth-child(3)::after { display: block; }
    .dmg-stat:nth-child(2n)::after { display: none; }
    .dmg-stat:nth-child(-n+4) { border-bottom: 1px solid var(--dmg-line); }
    .dmg-stat:nth-child(3), .dmg-stat:nth-child(5) { padding-left: 0; }
    .dmg-stat strong { font-size: 25px; }

    .dmg-section { padding: 62px 0; }
    .dmg-section-heading--split { gap: 20px; }
    .dmg-service-card { min-height: 390px; }
    .dmg-service-card__copy { max-width: none; padding: 30px; }
    .dmg-service-card__visual { right: -25%; top: 45%; width: 92%; opacity: .26; }
    .dmg-service-card__visual::after { background: linear-gradient(180deg, var(--dmg-navy-deep), rgba(16,27,72,.05)); }
    .dmg-fact-line { display: grid; gap: 5px; }
    .dmg-fact-line strong { text-align: left; }
    .dmg-qualification-card { padding: 28px; }
    .dmg-client-grid { grid-template-columns: repeat(2, 1fr); }
    .dmg-contact-band__inner { min-height: 300px; align-items: flex-start; justify-content: center; flex-direction: column; }

    .dmg-inner-hero .dmg-shell { padding-block: 72px 66px; }
    .dmg-inner-hero h1 { font-size: clamp(38px, 11vw, 52px); }
    .dmg-inner-hero p:not(.dmg-section-kicker) { font-size: 16px; }
    .dmg-content-cards,
    .dmg-infrastructure-band .wp-block-columns { grid-template-columns: 1fr; }
    .dmg-content-cards > .wp-block-column { margin-bottom: 0; }
    .dmg-infrastructure-band { padding: 28px; }
    .dmg-lifecycle { grid-template-columns: 1fr; }
    .dmg-history-timeline li { grid-template-columns: 78px 1fr; gap: 18px; }

    .dmg-project-filters,
    .dmg-project-grid,
    .dmg-project-gallery__grid,
    .dmg-technical-facts dl { grid-template-columns: 1fr; }
    .dmg-filter-actions { align-items: stretch; flex-direction: column; }
    .dmg-project-hero__visual { aspect-ratio: 16 / 10; min-height: 390px; }
    .dmg-project-hero__caption { bottom: 22px; }
    .dmg-project-hero__caption h1 { font-size: 37px; }
    .dmg-project-hero__caption p { font-size: 14px; }
    .dmg-project-card__body { padding: 21px; }
    .dmg-contact-details { grid-template-columns: 1fr; }
    .dmg-contact-details__general { grid-column: auto; }
    .dmg-site-footer__grid { grid-template-columns: 1fr; gap: 31px; }
    .dmg-site-footer__bottom { align-items: flex-start; flex-direction: column; }
}

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


.dmg-inner-hero__evidence { display: inline-flex; margin-top: 22px; padding: 7px 9px; color: rgba(255,255,255,.9); background: rgba(10,22,66,.58); border: 1px solid rgba(255,255,255,.22); border-radius: 4px; font-size: 10px; font-weight: 750; letter-spacing: .035em; }

/* Factual service-page visual treatment. The image comes from an approved public project record. */
.dmg-inner-hero.has-image {
    isolation: isolate;
    background: linear-gradient(95deg, rgba(16,27,72,.98) 0%, rgba(42,56,144,.94) 48%, rgba(42,56,144,.48) 72%, rgba(16,27,72,.18) 100%), var(--dmg-inner-image) center / cover no-repeat;
}
.dmg-inner-hero.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .15;
    background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.8) 55%, transparent 90%);
}
