﻿:root {
    /* colors */
    --green-900: #0b4f49;
    --green-800: #0d5f57;
    --green-700: #007167;
    --green-300: #6abf4b;
    --surface: #f7f8f8; /* off-white inner boxes */
    --surface-alt: #eef0f0; /* building-step headers */
    --surface-border: #e1e5e4; /* notice border */
    --gray-300: #d9dedd;
    --line: #dfe9e5;
    --text: #1d2b29;
    --muted: #4d5b58;
    --bg: #f4f6f5;
    --white: #ffffff;
    --danger: #e0312b;
    --cta-gradient: linear-gradient(90deg, #0a4a44 0%, #0b6a61 60%, #0f8277 100%);
    /* layout */
    --container-max: min(max(75rem, 84vw), 160rem); /* 1200px @1440, then 84% of the screen */
    --hero-art-max: 100%; /* hero artwork always spans the full screen width */
    --gutter: clamp(0.75rem, 2.5vw, 1.5rem); /* 12px → 24px */
    --section-gap: clamp(1rem, 1.6vh, 2rem); /* space between main cards */
    /* typography */
    --font: "Noto Sans Arabic", sans-serif; /* the only UI typeface */
    --fs-hero: clamp(1.75rem, 4.2vw, 2.875rem); /* 28px → 46px */
    --fs-h2: 1.0625rem;
    --fs-h3: 0.9375rem;
    --fs-body: 0.875rem;
    /* shape */
    --radius: 0.625rem;
    --radius-sm: 0.5rem;
    --shadow: 0 2px 10px rgba(11, 79, 73, 0.06);
}

/* =========================================================
   Base
   ========================================================= */
/**,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

 one typeface everywhere; bold = the real 700 file, never a synthesized one */
/*body, h1, h2, h3, h4, h5, h6, p, li, a, span, strong, small, label,
button, input, select, textarea, optgroup {
    font-family: var(--font);
}

b, strong {
    font-weight: 700;
}

html {
    font-synthesis: none;
}

html {
    /* grows with the screen's limiting side; ≥16px (respects the user's
     browser font setting), ≤36px /
    font-size: clamp(1rem, min(1.1111vw, 1.45vh), 2.25rem);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-wrap: break-word; /* long dynamic strings never break the layout /
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    color: inherit;
}

ul {
    list-style: none;
}

h2 {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
}

h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
}

p, li {
    font-size: var(--fs-body);
    color: var(--muted);
}

.container {
    width: 100%;
    max-width: calc(var(--container-max) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}*/

/* ===== Icons (Font Awesome) ===== */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--green-700);
    font-size: 1.25rem;
    width: 1.625rem;
}

.icon--lg {
    font-size: 2rem;
    width: 2.5rem;
}

/* =========================================================
   Header
   ========================================================= */
.topbar {
    position: relative;
    z-index: 5;
    padding-top: 0.875rem;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    padding: 0.625rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
/* official logo: Arabic wordmark + mark in one file */
.brand__logo {
    flex-shrink: 0;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.lang {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 0.9375rem;
}

    .lang i {
        font-size: 1.25rem;
    }

.bell {
    position: relative;
    display: flex;
    font-size: 1.25rem;
}

.bell__dot {
    position: absolute;
    top: -1px;
    inset-inline-end: -1px;
    width: 0.5625rem;
    height: 0.5625rem;
    border-radius: 50%;
    background: var(--danger);
    border: 1.5px solid var(--white);
}

.user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.user__text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    text-align: start;
}

    .user__text strong {
        font-size: 0.875rem;
        font-weight: 700;
    }

    .user__text small {
        font-size: 0.6875rem;
        color: var(--muted);
    }

.user__caret {
    font-size: 0.6875rem;
}

.user__avatar {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--white);
    font-size: 1.75rem;
    overflow: hidden;
    line-height: 1;
}

    .user__avatar i {
        transform: translateY(0.3125rem);
    }

/* =========================================================
   Hero
   ---------------------------------------------------------
   .hero__art holds the photo + fades + ornaments in a centred
   frame of --hero-art-max (full screen width on every screen, from
   phones to UltraWide), so the hero never leaves empty side bands.
   ========================================================= /
.hero {
    --photo-ratio: 0.72; /* photo width inside the frame /

    position: relative;
    margin-top: -3.75rem; /* slides under the floating topbar /
    padding: 6.25rem 0 4rem;
    overflow: hidden;
    isolation: isolate;
    background: var(--white);
}

.hero__art {
    position: absolute;
    inset: 0;
    max-width: var(--hero-art-max);
    margin-inline: auto;
    overflow: hidden;
    isolation: isolate;
    z-index: 0;
}

    .hero__art::before,
    .hero__art::after {
        content: "";
        position: absolute;
        inset: 0;
    }

    .hero__art::before {
        inset: 0 auto 0 0;
        width: calc(var(--photo-ratio) * 100%);
        z-index: -2;
        background: url("assets/madinah.jpg") center 60% / cover no-repeat;
    }

    .hero__art::after {
        z-index: -1;
        background: linear-gradient(to left, var(--white) 0%, var(--white) 34%, rgba(255,255,255,.88) 44%, rgba(255,255,255,.25) 60%, rgba(255,255,255,0) 72%), linear-gradient(to top, var(--bg) 0%, rgba(244,246,245,0) 22%);
    }

.hero__inner {
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 35rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78125rem;
    color: var(--muted);
    margin-bottom: 0.875rem;
}

    .breadcrumb a:hover {
        color: var(--green-700);
    }

.breadcrumb__sep {
    color: var(--text);
    font-size: 0.75rem;
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: 700;
    line-height: 1.35;
    color: var(--green-900);
    margin-bottom: 1.125rem;
}

.hero__desc {
    font-size: 1rem;
    color: var(--text);
    max-width: 29.375rem;
}*/

/* decorative side ornaments: large translucent municipality mark, cut by the frame edge */
.deco {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    aspect-ratio: 265 / 244;
    background: url("assets/logo-deco.svg") center / contain no-repeat;
}

.deco--left {
    top: 4.6875rem;
    left: -7.5rem;
    width: 22.5rem;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
    mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
}

.deco--right {
    top: 4.375rem;
    right: -9.375rem;
    width: 18.75rem;
    opacity: 0.22;
    transform: scaleX(-1);
    -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 90%);
    mask-image: linear-gradient(to bottom, #000 35%, transparent 90%);
}

/* =========================================================
   Fill the screen
   ---------------------------------------------------------
   body is a full-height column; .main takes the space left under
   the hero and its sections grow to share it, so tall screens get
   taller cards instead of an empty band at the bottom. When the
   content is taller than the screen, nothing grows (normal scroll).
   ========================================================= 
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}*/

.topbar, .hero {
    flex: none;
}

.main {
    flex: 1 0 auto;
    width: 100%;
}

    .main > * {
        flex: 1 0 auto;
    }

.panel {
    display: flex;
    flex-direction: column;
}

    .panel > .building-steps,
    .panel > .benefits {
        flex: 1 0 auto;
    }

.info-box {
    display: flex;
    flex-direction: column;
}

    .info-box > p,
    .info-box > ul {
        margin-block: auto;
    }
/* body text centred in the extra height */
.building-step__body {
    align-items: center;
}

/* =========================================================
   Main
   ========================================================= */
.main {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    padding: 2.5rem 0;
    position: relative;
    z-index: 3;
    margin-top: -0.625rem;
}
.before-intro {
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
/* ===== Intro (2 info boxes) ===== */
.intro {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-box {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 1.125rem 1.375rem 1.375rem;
}

.info-box__head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.625rem;
}

.info-box > p,
.info-box > ul {
    padding-inline-start: 3.375rem;
}
/* aligns body with heading text (icon 2.5rem + gap 0.875rem) */

.dot-list li {
    position: relative;
    padding-inline-start: 1.125rem;
    margin-bottom: 0.25rem;
}

    .dot-list li::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 0.75em;
        width: 0.375rem;
        height: 0.375rem;
        border-radius: 50%;
        background: var(--green-800);
    }

/* ===== Panel (white card with icon + title) ===== */
.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem 1.25rem;
}

.panel__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

/* ===== Steps (any number of .step separated by .step__arrow) ===== */
.building-steps {
    display: flex;
    gap: 0.5rem;
}

.building-step {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.building-step__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-alt);
    padding: 0.5rem 0.875rem;
}

.building-step__num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--line);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--green-800);
}

.building-step__body {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem 1.125rem;
    flex: 1;
}

    .building-step__body .icon {
        margin-top: 0.375rem;
    }

.building-step__arrow {
    flex: none;
    align-self: center;
    display: flex;
    justify-content: center;
    color: var(--text);
    font-size: 1rem;
}

/* ===== Benefits (any number of items; separators reset at each row start) ===== */
.benefits {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0;
    margin-bottom: 0.875rem;
}

    .benefits li {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.875rem;
        padding: 0.25rem 1.125rem;
        color: var(--text);
        line-height: 1.5;
        border-inline-start: 1px solid var(--line);
    }

        .benefits li:nth-child(5n+1) {
            border-inline-start: 0;
        }

.benefits__text {
    max-width: 9.375rem;
}

/* ===== Notice + CTA row ===== */
.cta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22.5rem;
    gap: 1rem;
}

.notice {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
}

    .notice p {
        color: var(--text);
        font-size: 0.84375rem;
    }

    .notice strong {
        font-weight: 700;
    }

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.625rem;
    border-radius: var(--radius-sm);
    color: var(--white);
    background: var(--cta-gradient);
    box-shadow: 0 6px 16px rgba(11, 79, 73, 0.25);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(11, 79, 73, 0.3);
    }

    .cta:focus-visible {
        outline: 3px solid var(--green-300);
        outline-offset: 3px;
    }

.cta__text {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    text-align: center;
    flex: 1;
}

    .cta__text strong {
        font-size: 1.0625rem;
        font-weight: 700;
    }

    .cta__text small {
        font-size: 0.8125rem;
        opacity: .85;
    }

.cta__icon {
    font-size: 1.375rem;
}

/* =========================================================
   Responsive
   ---------------------------------------------------------
   Desktop-first. Above 1200px nothing changes structurally:
   Full HD / 2K / 4K scale up through the proportional root
   font-size, the 84vw container and the full-height fill (see Tokens).
     ≤1199  small laptops / large tablets
     ≤1023  tablets landscape
     ≤859   tablets portrait
     ≤639   phones
     ≤379   small phones
   ========================================================= */

/* Small laptops / large tablets */
@media (max-width: 1199px) {
    .benefits li {
        padding: 0.25rem 0.75rem;
        gap: 0.625rem;
    }

    .icon--lg {
        font-size: 1.75rem;
        width: 2.25rem;
    }
}

/* Tablets landscape */
@media (max-width: 1023px) {
    .hero {
        --photo-ratio: 0.8;
    }

    .hero__art::after {
        background: linear-gradient(to left, var(--white) 0%, var(--white) 40%, rgba(255,255,255,.85) 55%, rgba(255,255,255,0) 80%), linear-gradient(to top, var(--bg) 0%, rgba(244,246,245,0) 22%);
    }

    .hero__content {
        max-width: 30rem;
    }

    .benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 0.875rem;
    }

        .benefits li:nth-child(5n+1) {
            border-inline-start: 1px solid var(--line);
        }

        .benefits li:nth-child(3n+1) {
            border-inline-start: 0;
        }

    .cta-row {
        grid-template-columns: 1fr;
    }

    .cta {
        max-width: 28.75rem;
        width: 100%;
        margin-inline: auto;
    }
}

/* Tablets portrait */
@media (max-width: 859px) {
    .intro {
        grid-template-columns: 1fr;
    }

    .building-steps {
        flex-direction: column;
    }

    .building-step {
        flex: none;
    }

    .building-step__arrow {
        transform: rotate(-90deg);
    }

    /* photo becomes a banner above the text */
    .hero {
        --photo-ratio: 1;
        padding: 15.625rem 0 2.5rem;
    }

    .hero__art::before {
        height: 18.75rem;
        bottom: auto;
        background-position: center 55%;
    }

    .hero__art::after {
        background: linear-gradient(to bottom, rgba(255,255,255,0) 0, rgba(255,255,255,0) 8.75rem, rgba(255,255,255,.9) 15rem, var(--white) 18.75rem, var(--bg) 100%);
    }

    .hero__content {
        max-width: none;
    }

    .hero__desc {
        max-width: none;
    }

    .deco--left {
        width: 16.25rem;
        left: -5.625rem;
        top: 3.75rem;
    }

    .deco--right {
        display: none;
    }
}

/* Phones */
@media (max-width: 639px) {
    .topbar {
        padding-top: 0.625rem;
    }

    .topbar__inner {
        padding: 0.5rem 0.75rem;
        gap: 0.625rem;
    }

    .brand {
        gap: 0.5rem;
    }

    .brand__logo {
        width: 8.5rem;
    }

    .topbar__actions {
        gap: 0.875rem;
    }

    .lang {
        gap: 0;
    }

        .lang i {
            font-size: 1.1875rem;
        }
    /* icon only on phones; label stays readable by screen readers */
    .lang__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .user__text, .user__caret {
        display: none;
    }

    .user__avatar {
        width: 2.125rem;
        height: 2.125rem;
        font-size: 1.5rem;
    }

    .hero {
        padding-top: 1.5rem;
    }

    .hero__art::before {
        height: 15rem;
    }

    .hero__art::after {
        background: linear-gradient(to bottom, rgba(255,255,255,0) 0, rgba(255,255,255,0) 6.25rem, rgba(255,255,255,.9) 11.875rem, var(--white) 15rem, var(--bg) 100%);
    }

    .hero__desc {
        font-size: 0.9375rem;
    }

    .deco--left {
        width: 11.25rem;
        left: -4.375rem;
        top: 3.125rem;
    }

    .intro {
        padding: 0.625rem;
        gap: 0.625rem;
    }

    .info-box {
        padding: 1rem;
    }

        .info-box > p, .info-box > ul {
            padding-inline-start: 0;
        }

    :root {
        --fs-h2: 1rem;
    }

    .panel {
        padding: 0.875rem 0.75rem;
    }

    .building-step__head {
        padding: 0.5rem 0.75rem;
    }

    .building-step__body {
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0.75rem 0.25rem;
    }

        .benefits li,
        .benefits li:nth-child(n) {
            justify-content: flex-start;
            border-inline-start: 0;
            padding: 0.375rem 0.625rem;
            font-size: 0.84375rem;
        }

            .benefits li:last-child:nth-child(odd) {
                grid-column: 1 / -1;
            }
    /* lone last item spans the row */
    .benefits__text {
        max-width: none;
    }

    .notice {
        padding: 0.75rem 0.875rem;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .cta {
        padding: 0.875rem 1.125rem;
        max-width: none;
    }

    .cta__text strong {
        font-size: 0.9375rem;
    }
}

/* Small phones */
@media (max-width: 379px) {
    .topbar__actions {
        gap: 0.625rem;
    }

    .benefits {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta {
        transition: none;
    }

        .cta:hover {
            transform: none;
        }
}
