/* =========================================================
   Nour Public Site — Shared page components
   ---------------------------------------------------------
   ترويسةُ الصفحة الداخلية، والأقسامُ المتعاقبة، والبطاقاتُ
   والنماذج. كلُّ قسمٍ سطحٌ مستقلّ: خلفيّتان تتناوبان وحدٌّ
   رفيعٌ يفصل القسمَ عمّا قبله.
   ========================================================= */

/* ---- Page header ----
   Same language as the statistics header: centred title with a soft icon
   tile, one line of text, on a light tinted gradient. */
.page-hero {
    padding: 4rem 0 5rem;
    text-align: center;
    background:
        radial-gradient(42rem 20rem at 88% -10%, rgba(66, 83, 184, 0.20), transparent 62%),
        radial-gradient(30rem 16rem at 6% 10%, rgba(245, 158, 11, 0.13), transparent 62%),
        linear-gradient(180deg, rgba(244, 246, 253, 0.9) 0%, var(--hero-next) 100%);
}

.page-hero-inner {
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.page-hero h1 {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(1.75rem, 1.35rem + 1.1vw, 2.3rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--ink);
    margin: 0 0 0.75rem;
}

.page-hero h1 > .bi {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.3rem;
}

.page-hero p {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--text-muted);
    margin: 0;
}


/* Creative touch shared by every page header: soft mesh colour, a soft
   glow across the band, and a curved lower edge that melts into the
   section below (its colour comes from --hero-next). */
.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    --hero-next: var(--surface-solid);
}


.page-hero:has(+ .page-section.is-alt),
.page-hero:has(+ .page-section > .nv-wrap) { --hero-next: var(--surface-soft); }
.page-hero > * { position: relative; }

/* ---- Sections ---- */
.page-section {
    padding: 5rem 0;
    background: var(--surface-solid);
    border-top: 1px solid var(--border);
}

.page-hero + .page-section { border-top: 0; padding-top: 3.5rem; }
.page-section.is-alt { background: var(--surface-soft); }
.page-section.is-alt:not(.has-lines) { position: relative; isolation: isolate; }
.page-section.is-alt::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 220px;
    z-index: -1;
    background:
        radial-gradient(38rem 7rem at 78% 50%, rgba(66, 83, 184, 0.06), transparent 70%),
        radial-gradient(30rem 6rem at 18% 50%, rgba(245, 158, 11, 0.045), transparent 70%);
    pointer-events: none;
}

.page-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.page-container.is-narrow { max-width: 860px; }

/* ---- Cards ---- */
.ui-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.ui-card.is-interactive:hover {
    transform: translateY(-4px);
    border-color: var(--primary-100);
    box-shadow: var(--shadow-lg);
}

.ui-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.35rem;
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

.ui-card.is-interactive:hover .ui-icon { background: var(--primary); color: #fff; }

/* ---- Forms (shared by join + complaints) ---- */
.form-shell {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-shell-body { padding: 2.25rem 2.5rem 2.5rem; }

.form-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 2.25rem 0 1.25rem;
    padding-bottom: 0.85rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
    border-bottom: 1px solid var(--border-soft);
}

.form-step:first-child { margin-top: 0; }

.form-step > .bi {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1rem;
}

.ui-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.ui-label > .bi { color: var(--text-label); }
.ui-label .req, .ui-req { color: var(--danger); }

.ui-input,
.ui-select,
.ui-textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.95rem;
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--text-main);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.ui-textarea { min-height: 130px; resize: vertical; line-height: 1.8; }

.ui-input::placeholder,
.ui-textarea::placeholder { color: #98A2B3; }

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(36, 48, 143, 0.12);
}

.ui-input:disabled,
.ui-select:disabled { background: var(--bg-subtle); color: var(--text-label); cursor: not-allowed; }

.ui-hint { margin-top: 0.4rem; font-size: 0.83rem; color: var(--text-label); }

.ui-alert {
    display: flex;
    gap: 0.65rem;
    padding: 0.95rem 1.1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.75;
    border-radius: var(--radius);
    border: 1px solid;
}

.ui-alert ul { margin: 0; padding-inline-start: 1.1rem; }
.ui-alert-danger { color: #B42318; background: #FEF3F2; border-color: #FECDCA; }
.ui-alert-success { color: #067647; background: #ECFDF3; border-color: #ABEFC6; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .page-hero { padding: 3rem 0 2.5rem; }
    .page-hero h1 > .bi { width: 42px; height: 42px; font-size: 1.15rem; }
    .page-section { padding: 3.5rem 0; }
    .page-container { padding: 0 1rem; }
    .form-shell { border-radius: var(--radius-lg); }
    .form-shell-body { padding: 1.5rem 1.25rem 1.75rem; }
}
