/* ==========================================================
   OUTCOMEGRID AFRIKA CONSULTANCY REQUEST PORTAL
   ========================================================== */

* {
    box-sizing: border-box;
}

:root {
    --primary-blue: #083b82;
    --primary-blue-dark: #062e65;
    --primary-green: #3fa34d;
    --primary-green-dark: #31843d;
    --text-dark: #1f2937;
    --text-medium: #475467;
    --text-muted: #667085;
    --border: #dfe5ec;
    --background: #f4f7fb;
    --white: #ffffff;
    --soft-blue: #eef4fb;
    --soft-green: #edf8ef;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text-dark);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* ==========================================================
   HEADER
   ========================================================== */

.consultancy-header {
    position: relative;
    z-index: 20;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-link {
    text-decoration: none;
}

.brand-name {
    color: var(--primary-blue);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-tagline {
    margin-top: 4px;
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.45px;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: var(--white);
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.back-home-link:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: var(--white);
}


/* ==========================================================
   HERO
   ========================================================== */

.consultancy-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 74px;
    background:
        linear-gradient(
            135deg,
            rgba(8, 59, 130, 0.98),
            rgba(6, 46, 101, 0.96)
        );
    color: var(--white);
}

.consultancy-hero::before {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    top: -190px;
    right: -120px;
    border-radius: 50%;
    background: rgba(63, 163, 77, 0.16);
}

.consultancy-hero::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    bottom: -190px;
    left: -90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.hero-container {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
    gap: 54px;
    align-items: center;
}

.hero-content {
    max-width: 700px;
}

.section-eyebrow {
    margin-bottom: 10px;
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.85px;
}

.consultancy-hero .section-eyebrow {
    color: #a9e2b0;
}

.hero-content h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -1.2px;
}

.hero-content p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.75;
}

.hero-assurance {
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
}

.hero-assurance h2 {
    margin: 0 0 20px;
    font-size: 19px;
}

.assurance-item {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.assurance-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.assurance-item:last-child {
    padding-bottom: 0;
}

.assurance-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--primary-green);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.assurance-item strong {
    display: block;
    color: var(--white);
    font-size: 14px;
}

.assurance-item p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    line-height: 1.55;
}


/* ==========================================================
   FORM SECTION
   ========================================================== */

.form-section {
    padding: 60px 0 78px;
}

.form-container {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.form-heading {
    margin-bottom: 22px;
}

.form-heading h2 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 31px;
    line-height: 1.2;
}

.form-heading p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

#consultancyRequestForm {
    display: grid;
    gap: 22px;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(20, 38, 63, 0.055);
}

legend {
    padding: 0 12px;
    color: var(--primary-blue);
    font-size: 17px;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 22px;
}

.form-field {
    min-width: 0;
}

.form-wide {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

label span[aria-hidden="true"] {
    color: #c62828;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input,
select {
    min-height: 46px;
    padding: 11px 13px;
}

textarea {
    padding: 12px 13px;
    resize: vertical;
    min-height: 120px;
    line-height: 1.65;
}

input::placeholder,
textarea::placeholder {
    color: #98a2b3;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #aab7c6;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(8, 59, 130, 0.11);
}

input[type="file"] {
    min-height: 52px;
    padding: 10px;
    background: #fafcff;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 13px;
    border: none;
    border-radius: 6px;
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-blue-dark);
}

.form-field small {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}


/* ==========================================================
   CONSENT
   ========================================================== */

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0;
    padding: 15px;
    border: 1px solid #cfe5d3;
    border-radius: 9px;
    background: var(--soft-green);
    cursor: pointer;
}

.consent-label input {
    width: 18px;
    height: 18px;
    min-height: auto;
    margin-top: 3px;
    flex: 0 0 18px;
    accent-color: var(--primary-green);
}

.consent-label span {
    color: #31593a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}


/* ==========================================================
   FORM ACTIONS
   ========================================================== */

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 23px 25px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(20, 38, 63, 0.05);
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 24px;
    border: none;
    border-radius: 8px;
    background: var(--primary-green);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(63, 163, 77, 0.22);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.submit-button:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(63, 163, 77, 0.28);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.form-actions p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}


/* ==========================================================
   VALIDATION STATES
   ========================================================== */

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.08);
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 11px;
    font-weight: 700;
}

.form-message {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 8px;
    line-height: 1.5;
}

.form-message.error {
    border: 1px solid #f3c5cb;
    background: #fdebec;
    color: #8f1d2c;
}

.form-message.success {
    border: 1px solid #bfe4ca;
    background: #e9f7ed;
    color: #176b35;
}


/* ==========================================================
   CONDITIONAL TOR UPLOAD
   ========================================================== */

#torUploadField {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

#torUploadField.is-hidden {
    display: none;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.consultancy-footer {
    background: #062e65;
    color: var(--white);
}

.footer-container {
    width: min(1180px, calc(100% - 32px));
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.footer-container > div:first-child {
    display: grid;
    gap: 4px;
}

.footer-container strong {
    font-size: 16px;
}

.footer-container span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 12px;
}

.footer-contacts {
    display: flex;
    align-items: center;
    gap: 19px;
    flex-wrap: wrap;
}


/* ==========================================================
   RESPONSIVE DESIGN
   ========================================================== */

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-assurance {
        max-width: 680px;
    }

    .consultancy-hero {
        padding: 56px 0 62px;
    }

    .hero-content h1 {
        font-size: 44px;
    }
}

@media (max-width: 700px) {
    .header-container {
        min-height: 70px;
    }

    .brand-name {
        font-size: 19px;
    }

    .brand-tagline {
        font-size: 11px;
    }

    .back-home-link {
        padding: 9px 12px;
        font-size: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-wide {
        grid-column: auto;
    }

    fieldset {
        padding: 22px 18px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-button {
        width: 100%;
    }

    .form-actions p {
        text-align: center;
    }

    .footer-container {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 24px 0;
    }

    .footer-contacts {
        display: grid;
        gap: 7px;
    }
}

@media (max-width: 520px) {
    .header-container {
        width: min(100% - 22px, 1180px);
        gap: 12px;
    }

    .back-home-link {
        white-space: nowrap;
    }

    .consultancy-hero {
        padding: 46px 0 52px;
    }

    .hero-container,
    .form-container,
    .footer-container {
        width: min(100% - 24px, 1180px);
    }

    .hero-content h1 {
        font-size: 35px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-assurance {
        padding: 21px;
    }

    .form-section {
        padding: 44px 0 58px;
    }

    .form-heading h2 {
        font-size: 26px;
    }

    legend {
        font-size: 15px;
    }
}