:root {
    --primary: #0F6E56;
    --primary-dark: #0A4E3E;
    --olive: #3B6D11;
    --green: #639922;
    --lime: #97C459;
    --teal: #1D9E75;
    --gold: #C7A34A;
    --ink: #18352D;
    --muted: #6D7C77;
    --page: #F4F8F6;
    --surface: #FFFFFF;
    --border: #DDE9E4;
    --shadow: 0 24px 70px rgba(15, 110, 86, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.8;
}

a {
    color: inherit;
}

.container {
    width: min(1440px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(221, 233, 228, .85);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
}

.navbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo,
.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
}

.brand-logo {
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    padding: 5px;
}

.brand-mark {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: #fff;
    font-size: 23px;
    font-weight: 900;
}

.brand-copy {
    display: grid;
    line-height: 1.35;
}

.brand-copy strong {
    color: var(--primary);
    font-size: 16px;
}

.brand-copy small {
    color: var(--muted);
    font-size: 11px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-menu {
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.main-menu a {
    padding: 8px 7px;
    border-radius: 9px;
    color: #52645E;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
}

.main-menu a:hover,
.main-menu a.is-active {
    background: #EAF5F0;
    color: var(--primary);
}

.login-button {
    padding: 11px 16px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.menu-button {
    display: none;
    width: 44px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: var(--primary);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    display: grid;
    align-items: center;
    background:
        radial-gradient(circle at 10% 20%, rgba(151,196,89,.20), transparent 27%),
        radial-gradient(circle at 88% 8%, rgba(29,158,117,.15), transparent 25%),
        linear-gradient(180deg, #F7FBF9 0%, #EEF6F2 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: .26;
    background-image:
        linear-gradient(rgba(15,110,86,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,110,86,.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 70px;
    padding-block: 90px;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 13px;
    border: 1px solid rgba(15,110,86,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.76);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.hero-copy h1 {
    margin: 22px 0 16px;
    max-width: 680px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.25;
    letter-spacing: -2px;
}

.hero-copy h1 span {
    display: block;
    color: var(--primary);
}

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: var(--muted);
    font-size: 17px;
}

.hero-actions {
    display: flex;
    gap: 11px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 900;
    text-decoration: none;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: #fff;
    box-shadow: 0 12px 30px rgba(15,110,86,.22);
}

.button-secondary {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary);
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
    color: #63736D;
    font-size: 12px;
    font-weight: 700;
}

.hero-dashboard {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.84);
    border-radius: 28px;
    background: rgba(255,255,255,.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    transform: rotate(-1deg);
}

.dashboard-top,
.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.dashboard-top div {
    display: grid;
}

.dashboard-top small,
.dashboard-highlight small,
.mini-card small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-top strong {
    font-size: 15px;
}

.live-dot {
    padding: 5px 9px;
    border-radius: 999px;
    background: #E3F6ED;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
}

.dashboard-highlight {
    margin-top: 16px;
    padding: 22px;
    border-radius: 19px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: #fff;
}

.dashboard-highlight small,
.dashboard-highlight span {
    color: rgba(255,255,255,.75);
}

.dashboard-highlight strong {
    display: block;
    margin: 5px 0;
    font-size: 37px;
    line-height: 1.2;
}

.dashboard-highlight span {
    font-size: 11px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 12px;
}

.mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
}

.mini-card > div {
    display: grid;
}

.mini-card strong {
    font-size: 19px;
}

.mini-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #EAF5F0;
    color: var(--primary);
    font-weight: 900;
}

.progress-block {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.progress-label {
    margin-bottom: 9px;
    font-size: 12px;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #E5EEE9;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lime), var(--primary));
}

.stats-section {
    padding: 85px 0 100px;
    background: #fff;
}

.section-heading {
    margin-bottom: 30px;
    text-align: center;
}

.section-heading span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(25px, 4vw, 38px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 38px rgba(15,110,86,.06);
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    left: -45px;
    bottom: -55px;
    border-radius: 50%;
    background: rgba(151,196,89,.13);
}

.stat-icon {
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
}

.stat-card strong {
    display: block;
    margin-top: 16px;
    color: var(--primary);
    font-size: 34px;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.stat-card-accent {
    border: 0;
    background: linear-gradient(135deg, var(--olive), var(--primary));
}

.stat-card-accent *,
.stat-card-accent strong {
    color: #fff;
}

@media (max-width: 980px) {
    .menu-button {
        display: block;
        margin-inline-start: auto;
    }

    .login-button {
        display: none;
    }

    .main-menu {
        position: absolute;
        top: 74px;
        right: 16px;
        left: 16px;
        display: none;
        white-space: normal;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 15px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .main-menu.is-open {
        display: grid;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-dashboard {
        transform: none;
    }
}

@media (max-width: 720px) {
    .brand-copy small {
        max-width: 155px;
    }

    .hero-grid {
        padding-block: 60px;
    }

    .hero-copy h1 {
        letter-spacing: -1px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-copy small {
        display: none;
    }

    .hero-actions .button {
        width: 100%;
    }

    .mini-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}


.section-heading-start {
    max-width: 760px;
    margin-inline: 0;
    text-align: right;
}

.section-heading-start p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.services-section {
    padding: 95px 0;
    background:
        radial-gradient(circle at 85% 10%, rgba(151,196,89,.12), transparent 25%),
        linear-gradient(180deg, #F7FBF9 0%, #EFF6F3 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.service-card {
    position: relative;
    min-height: 260px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 14px 42px rgba(15,110,86,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(15,110,86,.10);
}

.service-number {
    position: absolute;
    top: 15px;
    left: 17px;
    color: rgba(15,110,86,.25);
    font-size: 12px;
    font-weight: 900;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #E7F4EE;
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
}

.service-card h3 {
    margin: 18px 0 8px;
    color: var(--ink);
    font-size: 18px;
}

.service-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.service-card-featured {
    border: 0;
    background: linear-gradient(135deg, var(--olive), var(--primary));
}

.service-card-featured *,
.service-card-featured h3,
.service-card-featured p {
    color: #fff;
}

.service-card-featured .service-icon {
    background: rgba(255,255,255,.13);
}

.certificate-section {
    padding: 100px 0;
    background: #fff;
}

.certificate-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.certificate-copy h2 {
    margin: 18px 0 14px;
    font-size: clamp(28px, 4vw, 45px);
    line-height: 1.35;
}

.certificate-copy p {
    margin: 0;
    max-width: 650px;
    color: var(--muted);
    font-size: 15px;
}

.certificate-points {
    display: grid;
    gap: 9px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.certificate-points li {
    position: relative;
    padding-right: 26px;
    color: #53655E;
    font-size: 13px;
    font-weight: 700;
}

.certificate-points li::before {
    content: "✓";
    position: absolute;
    right: 0;
    top: 0;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #E7F4EE;
    color: var(--primary);
    font-size: 10px;
}

.certificate-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 10% 0%, rgba(151,196,89,.14), transparent 27%),
        #F8FBF9;
    box-shadow: var(--shadow);
}

.certificate-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.certificate-card-head > div {
    display: grid;
}

.certificate-card-head small {
    color: var(--muted);
    font-size: 11px;
}

.certificate-card-head strong {
    color: var(--primary);
    font-size: 17px;
}

.certificate-seal {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.certificate-form {
    margin-top: 25px;
}

.certificate-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.certificate-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.certificate-input-row input {
    min-height: 50px;
    width: 100%;
    padding: 0 15px;
    border: 1px solid #D6E4DE;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.certificate-input-row input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(29,158,117,.10);
}

.certificate-input-row button {
    min-height: 50px;
    padding: 0 19px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.certificate-form > small {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 11px;
}

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

    .certificate-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .certificate-card {
        padding: 20px;
    }

    .certificate-input-row {
        grid-template-columns: 1fr;
    }

    .certificate-input-row button {
        width: 100%;
    }
}

/* المرحلة الثالثة: رحلة الاستخدام والتواصل والتذييل */
.journey-section {
    padding: 105px 0;
    background:
        radial-gradient(circle at 12% 15%, rgba(151,196,89,.14), transparent 25%),
        linear-gradient(135deg, #F2F8F5, #EAF4EF);
}

.journey-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 70px;
    align-items: center;
}

.journey-copy h2 {
    margin: 18px 0 14px;
    font-size: clamp(29px, 4vw, 46px);
    line-height: 1.35;
}

.journey-copy p {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 15px;
}

.journey-steps {
    position: relative;
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.journey-steps::before {
    content: "";
    position: absolute;
    top: 45px;
    right: 25px;
    bottom: 45px;
    width: 2px;
    background: linear-gradient(var(--lime), var(--primary));
}

.journey-steps li {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 15px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(221,233,228,.95);
    border-radius: 18px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 12px 35px rgba(15,110,86,.06);
}

.journey-steps li > span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.journey-steps h3 {
    margin: 0;
    font-size: 17px;
}

.journey-steps p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.contact-section {
    padding: 75px 0;
    background: #fff;
}

.contact-panel {
    position: relative;
    overflow: hidden;
    min-height: 275px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    padding: 55px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--teal));
    color: #fff;
    box-shadow: 0 25px 65px rgba(10,78,62,.22);
}

.contact-panel::after {
    content: "م";
    position: absolute;
    left: 4%;
    bottom: -105px;
    color: rgba(255,255,255,.055);
    font-size: 280px;
    font-weight: 900;
    line-height: 1;
}

.contact-copy,
.contact-actions {
    position: relative;
    z-index: 1;
}

.contact-copy {
    max-width: 660px;
}

.contact-copy > span {
    color: #CDE8DA;
    font-size: 12px;
    font-weight: 900;
}

.contact-copy h2 {
    margin: 8px 0 10px;
    font-size: clamp(27px, 4vw, 43px);
    line-height: 1.35;
}

.contact-copy p {
    margin: 0;
    color: rgba(255,255,255,.75);
    font-size: 14px;
}

.contact-actions {
    min-width: 200px;
    display: grid;
    gap: 9px;
}

.contact-actions a {
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.contact-actions .contact-primary {
    border-color: #fff;
    background: #fff;
    color: var(--primary);
}

.site-footer {
    padding-top: 65px;
    background: #102D25;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr .7fr .8fr;
    gap: 55px;
    padding-bottom: 45px;
}

.site-footer .brand-copy strong,
.site-footer .brand-copy small {
    color: #fff;
}

.footer-brand p {
    max-width: 450px;
    margin: 18px 0 0;
    color: rgba(255,255,255,.58);
    font-size: 13px;
}

.footer-links,
.footer-contact {
    display: grid;
    align-content: start;
    gap: 9px;
}

.footer-links strong,
.footer-contact strong {
    margin-bottom: 7px;
    color: #fff;
    font-size: 14px;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
    color: rgba(255,255,255,.62);
    font-size: 12px;
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: #fff;
}

.footer-bottom {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,.09);
    color: rgba(255,255,255,.48);
    font-size: 11px;
}

@media (max-width: 980px) {
    .journey-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .journey-grid {
        gap: 40px;
    }

    .footer-grid {
        gap: 32px;
    }

    .contact-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-actions {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .journey-section {
        padding: 75px 0;
    }

    .journey-steps li {
        grid-template-columns: 43px 1fr;
        padding: 14px;
    }

    .journey-steps li > span {
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .journey-steps::before {
        right: 34px;
    }

    .contact-section {
        padding: 45px 0;
    }

    .contact-panel {
        min-height: 0;
        padding: 30px 22px;
        border-radius: 21px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-block: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .service-card {
        transition: none;
    }
}


/* ===== Medad header navigation - unified final rules ===== */
@media (min-width: 981px) {
    .site-header .container.navbar {
        width: min(1500px, calc(100% - 24px));
        min-height: 82px;
        gap: 16px;
        flex-wrap: nowrap;
    }

    .site-header .brand {
        flex: 0 0 auto;
    }

    .site-header .main-menu {
        margin-inline: 0;
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .site-header .main-menu > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 1 auto;
        min-height: 38px;
        margin: 0;
        padding: 8px 7px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        box-shadow: none;
        color: #52645E;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
        text-decoration: none;
    }

    .site-header .main-menu > a:hover,
    .site-header .main-menu > a.is-active {
        background: #EAF5F0;
        color: var(--primary);
    }
}

@media (max-width: 1180px) and (min-width: 981px) {
    .site-header .container.navbar { gap: 8px; }
    .site-header .brand-copy small { display: none; }
    .site-header .brand-copy strong { font-size: 14px; }
    .site-header .brand-logo,
    .site-header .brand-mark { width: 42px; height: 42px; }
    .site-header .main-menu > a { font-size: 11px; padding-inline: 4px; }
}

@media (max-width: 980px) {
    .site-header .main-menu > a {
        display: block;
        width: 100%;
        padding: 10px 12px;
        background: transparent;
        color: #52645E;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }
}
