:root {

    --primary-50:  #E9FBEC;
    --primary-100: #BCF3C5;
    --primary-300: #6EE582;
    --primary-400: #51E069;
    --primary-500: #26D844;
    --primary-600: #23C53E;
    --primary-700: #1B9930;
    --primary-800: #157725;


    --white:  #FFFFFF;
    --n100: #F3F4F6;
    --n200: #E5E7EB;
    --n300: #D2D6DB;
    --n500: #6C737F;
    --n600: #4D5761;
    --n700: #384250;
    --n800: #1F2A37;
    --n900: #111927;


    --text-black: #041607;
    --dark:       #141B34;
    --text-onbrand: #FFFFFF;
    --icon-placeholder: #9197A1;


    --dark-text-primary:   #FFFFFF;
    --dark-text-secondary: rgba(255,255,255,.75);
    --dark-text-muted:     rgba(255,255,255,.55);


    --font-en: 'Poppins', sans-serif;
    --font-ar: 'Cairo', 'Poppins', sans-serif;


    --container-width: 1232px;
    --side-margin: 104px;
    --header-height: 88px;
    --section-gap: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-black);
    line-height: 1.5;
    background: var(--white);
}

html[lang="en"] {
    font-family: var(--font-en);
    direction: ltr;
}

html[lang="ar"] {
    font-family: var(--font-ar);
    direction: rtl;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--n500); opacity: 1; }
ul, ol { list-style: none; }

.container {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 24px;
}

@media (min-width: 1440px) {
    .container {
        padding-inline: 0;
    }
}

.hero-title {
    font-weight: 600;
    font-size: 56px;
    line-height: 1;
    letter-spacing: 0;
}

.page-title {
    font-weight: 600;
    font-size: 32px;
    line-height: 48px;
    letter-spacing: 0;
    color: var(--text-black);
}

body, p, .body-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
}

.accent {
    color: var(--primary-500);
}

.icon-hugeicons {
    fill: currentColor;
}

.icon-vuesax {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
}

.form-field .icon {
    color: var(--icon-placeholder);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-500);
    color: var(--text-black);
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-primary:active {
    background: var(--primary-700);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-600);
    color: var(--primary-700);
}

.btn-outline:hover {
    background: var(--primary-50);
}

.page-hero {
    position: relative;
    padding-block: 40px 0;
}

.page-hero .container {
    position: relative;
    z-index: 1;
    height: 186px;
    border-radius: 24px;
    background: linear-gradient(98.26deg, #082B0E 10.69%, #115F1E 74.5%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-inline: 80px;
}

.page-hero .container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/textures/noise-grain-256x256.png');
    background-image: image-set(url('../images/textures/noise-grain-256x256.webp') type('image/webp'), url('../images/textures/noise-grain-256x256.png') type('image/png'));
    background-repeat: repeat;
    mix-blend-mode: overlay;
    opacity: 0.06;
    pointer-events: none;
}

/* نقشة الدوائر الكهربائية: واضحة في الطرف وبتختفي تدريجياً ناحية النص */
.page-hero .container::after {
    content: '';
    position: absolute;
    inset-block: 0;
    right: 0;
    width: 44%;
    background-image: url('../images/textures/circuit-pattern-608x608.png');
    background-position: right center;
    background-repeat: repeat-x;
    background-size: auto 186px;
    opacity: 0.12;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 25%, #000 55%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 25%, #000 55%);
    pointer-events: none;
}

html[dir="rtl"] .page-hero .container::after {
    right: auto;
    left: 0;
    transform: scaleX(-1);
}

.page-hero .breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--n300);
}

.page-hero .breadcrumb a {
    color: var(--n300);
    transition: color .2s;
}

.page-hero .breadcrumb a:hover {
    color: var(--white);
}

.page-hero .breadcrumb .current {
    color: var(--white);
}

.page-hero .breadcrumb svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

html[dir="rtl"] .page-hero .breadcrumb svg {
    transform: scaleX(-1);
}

.page-hero .page-title {
    position: relative;
    z-index: 1;
    margin-top: 4px;
    color: var(--dark-text-primary);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 14px;
    line-height: 21px;
    font-weight: 400;
    color: #0D121C;
}

.form-field label .required {
    color: #E53E3E;
    margin-inline-start: 2px;
}

.form-field .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    background: var(--white);
    padding-inline: 12px;
}

.form-field .input-wrap:focus-within {
    border-color: var(--primary-500);
}

.form-field .input-wrap .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.form-field input,
.form-field textarea {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    padding-inline-start: 8px;
    color: var(--text-black);
}

.form-field textarea {
    resize: none;
    height: 100%;
    padding-block: 12px;
}

.form-field.textarea .input-wrap {
    height: 137px;
    align-items: flex-start;
}

.form-field .helper-text {
    font-size: 13px;
    color: var(--n500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: var(--n600);
}

.pagination a.active {
    background: var(--primary-500);
    color: var(--white);
    font-weight: 600;
}

.pagination a:hover:not(.active) {
    background: var(--n100);
}

.cta-band {
    padding-block: 80px 112px;
}

.cta-band > div {
    position: relative;
    max-width: var(--container-width);
    width: 100%;
    height: 376px;
    margin-inline: auto;
    border-radius: 40px;
    background: linear-gradient(98.26deg, #082B0E 10.69%, #115F1E 74.5%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-inline: 40px;
    box-sizing: border-box;
}

.cta-band > div::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    background-image: url('../images/textures/circuit-pattern-608x608.png');
    background-repeat: repeat;
    background-size: auto 193px;
    background-position: center 50%;
    opacity: 0.045;
    -webkit-mask-image: linear-gradient(98deg, #000 0%, rgba(0, 0, 0, .55) 38%, rgba(0, 0, 0, .3) 68%, rgba(0, 0, 0, .5) 100%);
    mask-image: linear-gradient(98deg, #000 0%, rgba(0, 0, 0, .55) 38%, rgba(0, 0, 0, .3) 68%, rgba(0, 0, 0, .5) 100%);
    pointer-events: none;
}

html[dir="rtl"] .cta-band > div::before {
    transform: scaleX(-1);
}

.cta-band > div::after {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-end: 24px;
    transform: translateY(-50%);
    width: 554px;
    height: 524px;
    background-image: url('../images/illustrations/cta-graphic.svg');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    animation: cta-band-float 4s ease-in-out infinite;
}

@keyframes cta-band-float {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(calc(-50% - 16px)); }
}

@media (min-width: 1440px) {
    .cta-band > div { padding-inline: 40px; }
}

.cta-band > div > h2,
.cta-band > div > p,
.cta-band > div > a {
    position: relative;
    z-index: 1;
    max-width: 548px;
}

.cta-band h2 {
    font-size: 48px;
    line-height: 60px;
    font-weight: 600;
}

/* عنوان → سطر فرعي = 16px ثابتة مهما كان الـ inline style في الصفحة (بعض الصفحات فيها margin-bottom:16 inline وبعضها لأ) */
.cta-band > div > h2 {
    margin-bottom: 16px !important;
}

.cta-band > div > h2:last-of-type:not(:has(+ p)) {
    margin-bottom: 0 !important;
}

.cta-band p {
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
    color: var(--white);
    margin-top: 0;
}

/* نص → زرار = 40px في كل الصفحات (حتى اللي فيها inline margin مختلف) */
.cta-band > div > a {
    margin-top: 40px !important;
}

.cta-band .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 162px;
    height: 48px;
    padding: 8px 16px;
    border-radius: 45.5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: var(--white);
    box-sizing: border-box;
}

.cta-band .btn-primary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
}

@media (max-width: 900px) {
    .cta-band > div::after {
        display: none;
    }
}

/* موبايل: البانر والـ CTA ياخدوا هامش 16 من الجناب بدل ما يلزقوا في حافة الشاشة */
@media (max-width: 767px) {
    .page-hero {
        padding-inline: 16px;
    }
    .page-hero .container {
        height: auto;
        min-height: 160px;
        padding: 32px 24px;
    }
    .cta-band {
        padding: 48px 16px 64px;
    }
    .cta-band > div {
        height: auto;
        padding: 40px 24px;
        border-radius: 24px;
    }
    .cta-band > div::before {
        border-radius: 24px;
    }
    .cta-band h2 {
        font-size: 32px;
        line-height: 44px;
    }
    .cta-band p {
        font-size: 18px;
        line-height: 27px;
    }
}

.section {
    padding-block: var(--section-gap);
}

.section-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: 21px;
    font-size: 18px;
    line-height: 22px;
    font-weight: 500;
}

.text-center { text-align: center; }
.flex { display: flex; }
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 400px));
    gap: 16px;
    justify-content: center;
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* إطار التركيز للكيبورد */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.page-hero :focus-visible,
.cta-band :focus-visible,
.footer :focus-visible,
.header--dark :focus-visible {
    outline-color: var(--white);
}

/* الأجزاء الفاتحة جوه الهيدر الداكن (الكبسولة بعد الـ scroll، القائمة المنسدلة، قائمة الموبايل) */
.header--dark.header--scrolled :focus-visible,
.header--dark .header__dropdown-panel :focus-visible,
.header--dark .header__mobile-menu :focus-visible {
    outline-color: var(--text-black);
}

/* نص للقارئ الصوتي بس */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* حقل مخفي لحماية الفورمات */
.hp-field {
    position: absolute !important;
    inset-inline-start: 0;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

/* اتجاه النص التلقائي للنصوص اللاتينية داخل الصفحات العربية */
bdi {
    unicode-bidi: isolate;
}

/* حالة فاضية محايدة */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--n500);
    font-size: 18px;
    line-height: 27px;
}

/* صفحة 404 */
.not-found {
    padding-block: 120px;
}

.not-found__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.not-found__code {
    font-size: 96px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-500);
}

.not-found__text {
    max-width: 520px;
    color: var(--n600);
    margin-bottom: 8px;
}

@media (max-width: 767px) {
    .not-found {
        padding-block: 72px;
    }
    .not-found__code {
        font-size: 72px;
    }
}

/* رابط "تخطي إلى المحتوى": مخفي لحد ما ياخد التركيز بالكيبورد */
.skip-link {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2000;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--primary-500);
    color: var(--text-black);
    font-weight: 500;
    transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: none;
    outline: 2px solid var(--text-black);
    outline-offset: 2px;
}

/* <picture> حوالين اللوجو مالوش صندوق خاص — الـ img جواه بياخد مقاسه زي الأول */
.header__logo picture,
.footer__col--brand picture {
    display: contents;
}

main:focus {
    outline: none;
}
