/* ============================================================
   PLAN INTERNATIONAL – Process Simplification Survey
   Clean Modern Design
   ============================================================ */

:root {
    --blue:       #0087C8;
    --blue-dark:  #005F8E;
    --blue-soft:  #EBF6FD;
    --accent:     #F59E0B;
    --gray-50:    #F8FAFC;
    --gray-100:   #F1F5F9;
    --gray-200:   #E2E8F0;
    --gray-300:   #CBD5E1;
    --gray-400:   #94A3B8;
    --gray-500:   #64748B;
    --gray-600:   #475569;
    --gray-700:   #334155;
    --gray-900:   #0F172A;
    --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius:     12px;
    --radius-sm:  8px;
    --shadow-xs:  0 1px 3px rgba(15,23,42,.06);
    --shadow-sm:  0 1px 4px rgba(15,23,42,.08);
    --shadow-md:  0 4px 12px rgba(15,23,42,.08);
}

/* ── Base ────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
}

/* ── Progress Bar ────────────────────────────────────────── */
.progress-top {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--gray-200);
    z-index: 9999;
}
.progress-fill {
    height: 100%;
    background: var(--blue);
    width: 0%;
    transition: width .25s ease;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
}
.site-logo {
    height: 48px;
    width: auto;
    border-radius: 6px;
    display: block;
}
.org-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 1px;
}
.survey-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}
.badge-nairobi {
    background: var(--blue-soft);
    color: var(--blue-dark);
    border: 1px solid rgba(0,135,200,.2);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Intro Card ──────────────────────────────────────────── */
.intro-card {
    background: var(--blue-soft);
    border: 1px solid rgba(0,135,200,.18);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    padding: 22px 26px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.intro-icon {
    font-size: 1.75rem;
    color: var(--blue);
    flex-shrink: 0;
    margin-top: 1px;
}
.intro-card h5 { color: var(--gray-900); font-weight: 600; font-size: 15px; }
.intro-card p  { font-size: 14px; color: var(--gray-600); }

/* ── Respondent Card ─────────────────────────────────────── */
.section-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.section-card-header {
    background: var(--blue);
    color: #fff;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
}
.section-card-body { padding: 24px; }

/* ── Instructions Bar ────────────────────────────────────── */
.instructions-bar {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    color: #78350F;
    font-size: 14px;
}

/* ── Priority Blocks ─────────────────────────────────────── */
.priority-block {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s, transform .2s;
}
.priority-block:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.priority-block-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    color: #fff;
}

.priority-number {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}
.priority-title  { font-size: 15px; font-weight: 600; }
.priority-label  { font-size: 12px; font-weight: 400; opacity: .8; margin-left: 6px; }

.priority-block-body {
    padding: 26px 24px;
    background: #fff;
}

/* ── Field Labels & Hints ────────────────────────────────── */
.field-label,
.form-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 5px;
    display: block;
}
.required-label::after { content: ' *'; color: #DC2626; }
.field-hint {
    font-size: 12.5px;
    color: var(--gray-400);
    margin-bottom: 10px;
}
.form-group-block {
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 20px;
    margin-bottom: 4px;
}

/* ── Area Checkboxes ─────────────────────────────────────── */
.areas-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.area-option { position: relative; }
.area-checkbox {
    position: absolute;
    opacity: 0; width: 0; height: 0;
    pointer-events: none;
}
.area-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    background: var(--gray-50);
    transition: all .15s ease;
    user-select: none;
    white-space: nowrap;
}
.area-label:hover {
    border-color: var(--area-color, var(--blue));
    color: var(--area-color, var(--blue));
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.area-checkbox:checked + .area-label {
    background: var(--area-color, var(--blue));
    border-color: var(--area-color, var(--blue));
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.area-checkbox:focus + .area-label {
    outline: 2px solid rgba(0,135,200,.4);
    outline-offset: 2px;
}

/* ── Form Inputs ─────────────────────────────────────────── */
.field-input,
.form-select,
.form-control {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-size: 14.5px;
    font-family: var(--font);
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    color: var(--gray-900);
}
.field-input:hover,
.form-select:hover,
.form-control:hover { border-color: var(--gray-300); }
.field-input:focus,
.form-select:focus,
.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,135,200,.13);
    outline: none;
}
.field-input::placeholder,
.form-control::placeholder { color: var(--gray-400); }
textarea.field-input { resize: vertical; min-height: 90px; }

.form-control.is-invalid,
.form-select.is-invalid,
.field-input.is-invalid {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.10);
    background-image: none;
}
.form-control.is-valid,
.form-select.is-valid { border-color: #16A34A; background-image: none; }
.invalid-feedback { font-size: 12.5px; color: #DC2626; margin-top: 4px; }

/* ── Submit Section ──────────────────────────────────────── */
.submit-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 36px 28px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    text-align: center;
}
.btn-submit {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 13px 44px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    transition: background .15s, box-shadow .15s, transform .15s;
    min-width: 220px;
}
.btn-submit:hover {
    background: var(--blue-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,95,142,.35);
}
.btn-submit:active  { transform: translateY(0); }
.btn-submit:disabled { opacity: .65; transform: none; cursor: not-allowed; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-500);
    padding: 20px;
    font-size: 13px;
    margin-top: 40px;
}

/* ── Success Page ────────────────────────────────────────── */
.success-wrapper {
    background: #fff;
    border-radius: var(--radius);
    padding: 52px 40px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--blue);
}
.success-icon-circle {
    width: 80px; height: 80px;
    background: var(--blue-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.4rem;
    color: var(--blue);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .survey-title           { font-size: 1rem; }
    .site-logo              { height: 40px; }
    .priority-block-header  { padding: 14px 16px; gap: 12px; }
    .priority-number        { width: 36px; height: 36px; font-size: 1rem; }
    .priority-block-body    { padding: 18px 16px; }
    .section-card-body      { padding: 16px; }
    .intro-card             { flex-direction: column; gap: 10px; }
    .intro-icon             { font-size: 1.4rem; }
    .area-label             { font-size: 13px; padding: 5px 12px; }
    .submit-section         { padding: 24px 16px; }
    .btn-submit             { width: 100%; }
    .badge-nairobi          { display: none; }
}
@media (max-width: 480px) {
    .survey-title { font-size: .95rem; }
    .site-logo    { height: 34px; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
