/* ==========================================================
   QUIZ PAGE
   ========================================================== */

.quiz-page {
    background: var(--background);
}


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

.quiz-intro {
    padding: 110px 30px 70px;
    text-align: center;
}

.quiz-intro .container {
    max-width: 900px;
    margin: 0 auto;
}

.quiz-eyebrow {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--primary);

    font-size: 0.95rem;
    font-weight: 700;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.quiz-intro h1 {
    margin: 0 auto 25px;

    max-width: 850px;

    font-size: 4rem;
    line-height: 1.15;
}

.quiz-intro-text {
    max-width: 780px;
    margin: 0 auto;

    color: var(--text-light);

    font-size: 1.1rem;
    line-height: 1.9;
}

.quiz-meta {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 35px;

    margin-top: 35px;

    color: var(--text-light);

    font-size: 0.95rem;
}

.quiz-meta strong {
    color: var(--primary-dark);
}

.quiz-disclaimer {
    max-width: 760px;
    margin: 35px auto 0;
    padding: 16px 22px;

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

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

    color: var(--text-light);

    font-size: 0.88rem;
    line-height: 1.7;
}


/* ==========================================================
   QUIZ SECTION
   ========================================================== */

.quiz-section {
    padding: 20px 30px 110px;
}

.quiz-section > .container {
    max-width: 1000px;
    margin: 0 auto;
}


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

.quiz-form {
    width: 100%;
}


/* ==========================================================
   QUESTION
   ========================================================== */

.quiz-question {
    margin: 0 0 45px;
    padding: 40px;

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

    background: #ffffff;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
}

.quiz-question legend {
    display: flex;
    align-items: flex-start;

    width: 100%;

    margin-bottom: 30px;
    padding: 0;

    color: var(--primary-dark);

    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.5;
}

.question-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    margin-right: 18px;

    border-radius: 50%;

    background: var(--primary);
    color: white;

    font-size: 0.9rem;
    font-weight: 700;
}


/* ==========================================================
   ANSWERS
   ========================================================== */

.answer-grid {
    display: grid;

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

    gap: 15px;
}

.answer-grid-small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* ==========================================================
   ANSWER CARD
   ========================================================== */

.answer-card {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 76px;

    padding: 18px 22px;

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

    background: #ffffff;

    cursor: pointer;

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

.answer-card:hover {
    border-color: var(--primary);

    background: var(--background);

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}


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

.answer-card input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


/* ==========================================================
   ANSWER TEXT
   ========================================================== */

.answer-content {
    position: relative;

    display: block;

    width: 100%;

    padding-left: 34px;

    color: var(--text);

    font-size: 0.98rem;
    line-height: 1.6;
}

.answer-content::before {
    content: "";

    position: absolute;

    left: 0;
    top: 50%;

    width: 20px;
    height: 20px;

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

    border-radius: 50%;

    background: white;

    transform: translateY(-50%);

    transition: 0.25s ease;
}


/* ==========================================================
   SELECTED ANSWER
   ========================================================== */

.answer-card:has(input:checked) {
    border-color: var(--primary);

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

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);

    transform: translateY(-2px);
}

.answer-card:has(input:checked) .answer-content {
    color: var(--primary-dark);

    font-weight: 600;
}

.answer-card:has(input:checked) .answer-content::before {
    border-color: var(--primary);

    background:
        radial-gradient(
            circle,
            var(--primary) 0 5px,
            white 6px
        );
}


/* ==========================================================
   FOCUS
   ========================================================== */

.answer-card:has(input:focus-visible) {
    outline: 3px solid rgba(0, 0, 0, 0.12);
    outline-offset: 3px;
}


/* ==========================================================
   SUBMIT
   ========================================================== */

.quiz-submit {
    display: flex;
    justify-content: center;

    margin-top: 55px;
}

.quiz-submit-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    gap: 18px;

    min-width: 250px;

    padding: 16px 28px;

    border: none;
    border-radius: 50px;

    background: var(--primary);
    color: white;

    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);

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

.quiz-submit-button span {
    font-size: 1.25rem;

    transition: transform 0.25s ease;
}

.quiz-submit-button:hover {
    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.quiz-submit-button:hover span {
    transform: translateX(4px);
}

.quiz-submit-button:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.15);
    outline-offset: 4px;
}


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

.quiz-footer-note {
    max-width: 700px;

    margin: 25px auto 0;

    text-align: center;

    color: var(--text-light);

    font-size: 0.85rem;
    line-height: 1.7;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 992px) {

    .quiz-intro {
        padding: 80px 25px 55px;
    }

    .quiz-intro h1 {
        font-size: 3.2rem;
    }

    .quiz-section {
        padding: 15px 25px 80px;
    }

    .quiz-question {
        padding: 30px;
    }

    .answer-grid-small {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    .quiz-intro {
        padding: 65px 20px 45px;
        text-align: left;
    }

    .quiz-intro h1 {
        font-size: 2.5rem;
    }

    .quiz-intro-text {
        margin: 0;
    }

    .quiz-meta {
        flex-direction: column;

        gap: 8px;
    }

    .quiz-section {
        padding: 10px 20px 60px;
    }

    .quiz-question {
        padding: 25px 20px;

        margin-bottom: 25px;
    }

    .quiz-question legend {
        font-size: 1.2rem;
    }

    .question-number {
        flex-basis: 40px;

        width: 40px;
        height: 40px;

        margin-right: 13px;

        font-size: 0.8rem;
    }

    .answer-grid,
    .answer-grid-small {
        grid-template-columns: 1fr;
    }

    .answer-card {
        min-height: 70px;

        padding: 16px;
    }

    .answer-content {
        font-size: 0.95rem;
    }

    .quiz-submit {
        margin-top: 35px;
    }

    .quiz-submit-button {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .quiz-intro h1 {
        font-size: 2.15rem;
    }

    .quiz-eyebrow {
        font-size: 0.8rem;
    }

    .quiz-disclaimer {
        margin: 35px 0 0;
    }

    .quiz-question {
        padding: 22px 16px;
    }

    .quiz-question legend {
        font-size: 1.1rem;
    }

}

/* ==========================================================
   QUIZ RESULT
   ========================================================== */

.quiz-result-page {
    background: var(--background);
}

.quiz-result-section {
    padding: 100px 30px 110px;
}

.quiz-result-section > .container {
    max-width: 950px;
    margin: 0 auto;
}


/* ==========================================================
   RESULT HEADING
   ========================================================== */

.quiz-result-heading {
    max-width: 780px;

    margin: 0 auto 50px;

    text-align: center;
}

.quiz-result-heading h1 {
    margin: 18px auto 20px;

    font-size: 3.2rem;
    line-height: 1.2;
}

.quiz-result-heading > p {
    max-width: 680px;

    margin: 0 auto;

    color: var(--text-light);

    font-size: 0.95rem;
    line-height: 1.8;
}


/* ==========================================================
   RESULT CARD
   ========================================================== */

.quiz-result-card {
    position: relative;

    max-width: 820px;

    margin: 0 auto;

    padding: 55px;

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

    background: #ffffff;

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.07);

    overflow: hidden;
}

.quiz-result-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 5px;

    background: var(--primary);
}


/* ==========================================================
   CARD TOP
   ========================================================== */

.quiz-result-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 25px;
}

.quiz-result-label {
    color: var(--primary);

    font-size: 0.8rem;
    font-weight: 700;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.quiz-result-mark {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: var(--background);
    color: var(--primary);

    font-size: 1.25rem;
    font-weight: 700;
}


/* ==========================================================
   RESULT TITLE
   ========================================================== */

.quiz-result-card h2 {
    margin: 0 0 22px;

    color: var(--primary-dark);

    font-size: 2.7rem;
    line-height: 1.2;
}

.quiz-result-description {
    max-width: 720px;

    margin: 0;

    color: var(--text-light);

    font-size: 1.08rem;
    line-height: 1.9;
}


/* ==========================================================
   ONLINE
   ========================================================== */

.quiz-online-note {
    display: flex;
    align-items: center;

    gap: 15px;

    margin-top: 32px;
    padding: 18px 20px;

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

    background: var(--background);
}

.quiz-online-icon {
    display: flex;
    justify-content: center;
    align-items: center;

    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    font-size: 0.85rem;
    font-weight: 700;
}

.quiz-online-note strong {
    display: block;

    margin-bottom: 3px;

    color: var(--primary-dark);
}

.quiz-online-note p {
    margin: 0;

    color: var(--text-light);

    font-size: 0.9rem;
}


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

.quiz-result-actions {
    display: flex;
    align-items: center;

    gap: 25px;

    margin-top: 38px;
}

.quiz-result-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    gap: 15px;

    padding: 15px 25px;

    border-radius: 50px;

    background: var(--primary);
    color: white;

    font-size: 0.95rem;
    font-weight: 600;

    text-decoration: none;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);

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

.quiz-result-button:hover {
    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.quiz-result-button span {
    font-size: 1.15rem;

    transition: transform 0.25s ease;
}

.quiz-result-button:hover span {
    transform: translateX(4px);
}

.quiz-result-secondary {
    color: var(--text-light);

    font-size: 0.9rem;
    font-weight: 500;

    text-decoration: none;

    border-bottom: 1px solid transparent;

    transition:
        color 0.25s ease,
        border-color 0.25s ease;
}

.quiz-result-secondary:hover {
    color: var(--primary-dark);

    border-color: var(--primary-dark);
}


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

.quiz-result-footer {
    max-width: 700px;

    margin: 45px auto 0;

    text-align: center;
}

.quiz-result-footer p {
    margin-bottom: 15px;

    color: var(--text-light);

    font-size: 0.95rem;
    line-height: 1.8;
}

.quiz-result-footer a {
    color: var(--primary-dark);

    font-weight: 600;

    text-decoration: none;
}

.quiz-result-footer a:hover {
    text-decoration: underline;
}


/* ==========================================================
   ERROR
   ========================================================== */

.quiz-result-error {
    text-align: center;
}

.quiz-result-error .quiz-result-mark {
    margin: 0 auto 25px;
}


/* ==========================================================
   RESULT RESPONSIVE
   ========================================================== */

@media (max-width: 700px) {

    .quiz-result-section {
        padding: 65px 20px 70px;
    }

    .quiz-result-heading {
        margin-bottom: 35px;
    }

    .quiz-result-heading h1 {
        font-size: 2.35rem;
    }

    .quiz-result-card {
        padding: 35px 25px;

        border-radius: 22px;
    }

    .quiz-result-card h2 {
        font-size: 2rem;
    }

    .quiz-result-description {
        font-size: 1rem;
    }

    .quiz-result-actions {
        flex-direction: column;
        align-items: stretch;

        gap: 18px;
    }

    .quiz-result-button {
        width: 100%;
    }

    .quiz-result-secondary {
        align-self: center;
    }

}


@media (max-width: 480px) {

    .quiz-result-heading h1 {
        font-size: 2rem;
    }

    .quiz-result-card {
        padding: 30px 20px;
    }

    .quiz-result-card h2 {
        font-size: 1.8rem;
    }

    .quiz-result-card-top {
        align-items: flex-start;
    }

}

