/* =========================================
   RESEARCH DATA COLLECTION FORM
   Main Stylesheet
========================================= */

/* ---------- RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ---------- ROOT VARIABLES ---------- */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    --text-dark: #0f172a;
    --text: #334155;
    --text-light: #64748b;

    --border: #e2e8f0;
    --border-dark: #cbd5e1;

    --background: #f8fafc;
    --white: #ffffff;

    --success: #16a34a;
    --danger: #dc2626;

    --shadow:
        0 8px 25px rgba(15, 23, 42, 0.06);

    --radius: 12px;
}


/* ---------- BODY ---------- */

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--background);

    color: var(--text);

    line-height: 1.6;
}


/* =========================================
   HEADER
========================================= */

.site-header {
    background:
        linear-gradient(
            135deg,
            #1e3a8a 0%,
            #2563eb 100%
        );

    color: white;

    padding: 26px 20px;

    box-shadow:
        0 4px 20px rgba(30, 58, 138, 0.18);
}


.header-container {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


/* ---------- BRAND ---------- */

.brand {
    display: flex;

    align-items: center;

    gap: 15px;
}


.brand-icon {
    width: 52px;
    height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(255, 255, 255, 0.15);

    border:
        1px solid rgba(255, 255, 255, 0.25);

    border-radius: 12px;

    font-size: 24px;

    font-weight: 700;
}


.brand h1 {
    font-size: 22px;

    line-height: 1.3;

    font-weight: 700;

    margin-bottom: 3px;
}


.brand p {
    font-size: 13px;

    opacity: 0.8;
}


/* ---------- HEADER BADGE ---------- */

.header-badge {
    padding: 8px 15px;

    border-radius: 30px;

    background:
        rgba(255, 255, 255, 0.12);

    border:
        1px solid rgba(255, 255, 255, 0.2);

    font-size: 13px;

    white-space: nowrap;
}


/* =========================================
   MAIN CONTAINER
========================================= */

.container {
    width: 100%;

    max-width: 1000px;

    margin: 45px auto;

    padding: 0 20px;
}


/* =========================================
   PAGE INTRO
========================================= */

.page-intro {
    margin-bottom: 30px;
}


.form-label {
    display: inline-block;

    padding: 5px 10px;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 5px;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;
}


.page-intro h2 {
    margin-top: 12px;

    color: var(--text-dark);

    font-size: 30px;

    line-height: 1.3;
}


.page-intro p {
    max-width: 700px;

    margin-top: 8px;

    color: var(--text-light);

    font-size: 15px;
}


/* =========================================
   FORM
========================================= */

.research-form {
    display: flex;

    flex-direction: column;

    gap: 22px;
}


/* =========================================
   FORM SECTION
========================================= */

.form-section {
    background: var(--white);

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    padding: 28px;

    box-shadow: var(--shadow);
}


/* =========================================
   SECTION HEADER
========================================= */

.section-header {
    display: flex;

    align-items: center;

    gap: 14px;

    padding-bottom: 20px;

    margin-bottom: 25px;

    border-bottom:
        1px solid var(--border);
}


.section-number {
    width: 44px;
    height: 44px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 10px;

    font-size: 13px;

    font-weight: 700;
}


.section-header h3 {
    color: var(--text-dark);

    font-size: 18px;

    line-height: 1.3;
}


.section-header p {
    margin-top: 2px;

    color: var(--text-light);

    font-size: 13px;
}


/* =========================================
   FORM GRID
========================================= */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 22px;
}


.full-width {
    grid-column: 1 / -1;
}


/* =========================================
   FORM GROUP
========================================= */

.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 22px;
}


.form-group:last-child {
    margin-bottom: 0;
}


.form-group label {
    color: var(--text);

    font-size: 14px;

    font-weight: 600;
}


.form-group label span {
    color: var(--danger);

    margin-left: 2px;
}


/* =========================================
   INPUT / SELECT / TEXTAREA
========================================= */

input,
select,
textarea {
    width: 100%;

    padding: 12px 14px;

    border:
        1px solid var(--border-dark);

    border-radius: 8px;

    background: #ffffff;

    color: var(--text-dark);

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}


input:hover,
select:hover,
textarea:hover {
    border-color: #94a3b8;
}


input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);
}


input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}


textarea {
    min-height: 120px;

    resize: vertical;

    line-height: 1.6;
}


select {
    cursor: pointer;
}


/* =========================================
   RADIO BUTTONS
========================================= */

.radio-group {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;
}


.radio-option {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 11px 13px;

    background: #fafafa;

    border:
        1px solid var(--border);

    border-radius: 8px;

    cursor: pointer;

    color: var(--text);

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}


.radio-option:hover {
    background: var(--primary-light);

    border-color: #93c5fd;
}


.radio-option input {
    width: auto;

    margin: 0;

    accent-color: var(--primary);

    cursor: pointer;
}


.radio-option:has(input:checked) {
    background: var(--primary-light);

    border-color: var(--primary);

    color: var(--primary);

    font-weight: 600;
}


/* =========================================
   CONSENT SECTION
========================================= */

.consent-section {
    padding: 18px 20px;

    background: #eff6ff;

    border:
        1px solid #bfdbfe;

    border-radius: 10px;
}


.consent {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    color: var(--text);

    font-size: 13px;

    line-height: 1.6;

    cursor: pointer;
}


.consent input {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    margin-top: 3px;

    accent-color: var(--primary);

    cursor: pointer;
}


/* =========================================
   FORM ACTIONS
========================================= */

.form-actions {
    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 12px;

    padding-top: 5px;
}


.btn {
    min-width: 130px;

    padding: 12px 20px;

    border-radius: 8px;

    font-family: inherit;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.btn:hover {
    transform: translateY(-1px);
}


/* ---------- PRIMARY BUTTON ---------- */

.btn-primary {
    border: none;

    background: var(--primary);

    color: white;

    box-shadow:
        0 5px 15px rgba(37, 99, 235, 0.2);
}


.btn-primary:hover {
    background: var(--primary-dark);

    box-shadow:
        0 7px 18px rgba(37, 99, 235, 0.25);
}


/* ---------- SECONDARY BUTTON ---------- */

.btn-secondary {
    background: white;

    color: var(--text);

    border:
        1px solid var(--border-dark);
}


.btn-secondary:hover {
    background: #f8fafc;

    border-color: #94a3b8;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    margin-top: 50px;

    padding: 25px 20px;

    border-top:
        1px solid var(--border);

    background: white;

    text-align: center;

    color: var(--text-light);

    font-size: 12px;
}


.site-footer p:first-child {
    margin-bottom: 4px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 768px) {

    .header-container {
        align-items: flex-start;
    }


    .header-badge {
        display: none;
    }


    .brand h1 {
        font-size: 19px;
    }


    .page-intro h2 {
        font-size: 26px;
    }


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


    .full-width {
        grid-column: auto;
    }


    .radio-group {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 480px) {

    .site-header {
        padding: 20px 15px;
    }


    .brand {
        gap: 11px;
    }


    .brand-icon {
        width: 44px;
        height: 44px;

        border-radius: 9px;

        font-size: 20px;
    }


    .brand h1 {
        font-size: 17px;
    }


    .brand p {
        font-size: 11px;
    }


    .container {
        margin-top: 30px;

        padding:
            0 14px;
    }


    .page-intro {
        margin-bottom: 22px;
    }


    .page-intro h2 {
        font-size: 23px;
    }


    .page-intro p {
        font-size: 14px;
    }


    .form-section {
        padding: 20px 16px;
    }


    .section-header {
        align-items: flex-start;

        gap: 11px;
    }


    .section-number {
        width: 38px;
        height: 38px;
    }


    .section-header h3 {
        font-size: 16px;
    }


    .section-header p {
        font-size: 12px;
    }


    .radio-group {
        grid-template-columns: 1fr;
    }


    .form-actions {
        flex-direction: column-reverse;

        width: 100%;
    }


    .btn {
        width: 100%;
    }


    .consent {
        font-size: 12px;
    }
}


/* =========================================
   ACCESSIBILITY
========================================= */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline:
        3px solid rgba(37, 99, 235, 0.25);

    outline-offset: 2px;
}


/* =========================================
   PRINT VERSION
========================================= */

@media print {

    body {
        background: white;
    }


    .site-header {
        background: white;

        color: black;

        box-shadow: none;

        border-bottom:
            1px solid #ddd;
    }


    .header-badge,
    .form-actions {
        display: none;
    }


    .form-section {
        box-shadow: none;

        break-inside: avoid;
    }


    .site-footer {
        display: none;
    }
}