:root {
    --mff-container: 1240px;
    --mff-gutter: clamp(16px, 3.5vw, 42px);
    --mff-primary: #389E87;
    --mff-secondary: #1A6788;
    --mff-soft: #DFF2DE;
    --mff-ink: #1F1F1F;
    --mff-muted: #5B6870
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px
}

body {
    margin: 0;
    overflow-x: hidden
}

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

img {
    max-width: 100%;
    height: auto
}

.wp-site-blocks {
    overflow: clip
}

.mff-container {
    width: min(var(--mff-container), calc(100% - var(--mff-gutter)*2));
    margin-inline: auto
}

.mff-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important
}

button,
a {
    touch-action: manipulation
}

@media(max-width:900px) {
    :root {
        --mff-gutter: 18px
    }

    .wp-site-blocks {
        padding-inline: 0
    }
}

@media(max-width:480px) {
    :root {
        --mff-gutter: 14px
    }
}

/* ===== Full-width components with equal side padding (single source of truth) ===== */
:root {
    --mff-side: clamp(20px, 5vw, 80px)
}

.wp-block[data-type^="mff/"] {
    max-width: none !important
}

.mff-hero,
.mff-cta,
.mff-section-header,
.mff-statistics,
.mff-about-tabs,
.mff-initiative-tabs {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: var(--mff-side) !important;
    padding-right: var(--mff-side) !important;
    box-sizing: border-box
}

.mff-cta {
    border-radius: 0
}

.mff-site-header__top-inner,
.mff-site-header__inner,
.mff-site-header__mobile-nav {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: var(--mff-side) !important;
    padding-right: var(--mff-side) !important;
    box-sizing: border-box
}

/* ===== Edge-to-edge: no outer margins/padding/gaps around any component ===== */
html {
    padding: 0 !important;
    width: 100%
}

body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%
}

.wp-site-blocks,
.wp-site-blocks.has-global-padding,
.has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    gap: 0 !important
}

.wp-site-blocks>*,
.wp-site-blocks>.wp-block-template-part,
.wp-block-template-part {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100%
}

.wp-site-blocks>main,
.wp-site-blocks>main.wp-block-group,
main.wp-block-group {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important
}

.is-layout-constrained>.mff-hero,
.is-layout-constrained>.mff-cta,
.is-layout-constrained>.mff-section-header,
.is-layout-constrained>.mff-statistics,
.is-layout-constrained>.mff-about-tabs,
.is-layout-constrained>.mff-initiative-tabs,
.is-layout-constrained>.mff-site-header,
.is-layout-constrained>.mff-site-footer,
.is-layout-flow>.mff-hero,
.is-layout-flow>.mff-cta,
.is-layout-flow>.mff-section-header,
.is-layout-flow>.mff-statistics,
.is-layout-flow>.mff-about-tabs,
.is-layout-flow>.mff-initiative-tabs,
.is-layout-flow>.mff-site-header,
.is-layout-flow>.mff-site-footer {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important
}

.mff-site-header,
.mff-site-footer,
.mff-hero,
.mff-cta,
.mff-section-header,
.mff-statistics,
.mff-about-tabs,
.mff-initiative-tabs {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
}

.mff-site-header,
.mff-site-footer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: none !important
}

.mff-site-header__top {
    width: 100%
}

/* Block editor canvas: same edge-to-edge behaviour */
.editor-styles-wrapper,
body.editor-styles-wrapper {
    padding: 0 !important;
    margin: 0 !important
}

.editor-styles-wrapper .is-root-container,
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important
}

.editor-styles-wrapper .wp-block[data-type^="mff/"],
.editor-styles-wrapper .is-root-container>.wp-block[data-type^="mff/"] {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important
}

/* ===== Sticky footer: always at the bottom of the screen on short pages ===== */
.wp-site-blocks {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh
}

body.admin-bar .wp-site-blocks {
    min-height: calc(100vh - 32px);
    min-height: calc(100dvh - 32px)
}

@media(max-width:782px) {
    body.admin-bar .wp-site-blocks {
        min-height: calc(100vh - 46px);
        min-height: calc(100dvh - 46px)
    }
}

.wp-site-blocks>main {
    flex: 1 0 auto
}

.wp-site-blocks>header,
.wp-site-blocks>footer,
.wp-site-blocks>.wp-block-template-part {
    flex: 0 0 auto
}

/* Editor: fill the canvas and keep the footer at the bottom */
html,
body.editor-styles-wrapper {
    min-height: 100%;
    margin: 0
}

.editor-styles-wrapper .is-root-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.editor-styles-wrapper .is-root-container>.wp-block-template-part:last-child,
.editor-styles-wrapper .is-root-container>main:last-child {
    margin-top: auto !important
}

.editor-styles-wrapper .is-root-container>main {
    flex: 1 0 auto
}

/* ===== Sticky footer FIX ===== */
.wp-site-blocks>main,
.wp-site-blocks>main.wp-block-group,
main.wp-block-group {
    display: flex !important;
    flex-direction: column;
    flex: 1 0 auto
}

.wp-site-blocks>main>.wp-block-post-content,
.wp-site-blocks>main>.entry-content {
    display: flex !important;
    flex-direction: column;
    flex: 1 0 auto;
    width: 100%;
    max-width: none !important
}

.wp-site-blocks>main>.wp-block-post-content>*,
.wp-site-blocks>main>*:not(.wp-block-post-content) {
    flex-shrink: 0
}

/* دفع الفوتر إلى أسفل الصفحة تمامًا */
.wp-site-blocks .mff-site-footer {
    margin-top: auto !important;
    margin-bottom: 0 !important
}

/* محرر Gutenberg */
.editor-styles-wrapper .is-root-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.editor-styles-wrapper .is-root-container>.wp-block[data-type="mff/site-footer"],
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>.wp-block[data-type="mff/site-footer"] {
    margin-top: auto !important
}

/* الخط: كايرو */
body,
button,
input,
textarea,
select {
    font-family: Cairo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}