/* ============================================
   Heartsaver CPR Guide – Home Screen
   Based on Figma design (834×1160 mobile/tablet)
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Background image – blurred */
.hero-bg {
    position: absolute;
    inset: -4px;             /* extend edges to hide blur artifacts */
    background: url('images/homescreen.png') center / cover no-repeat;
    filter: blur(2px);
    z-index: 0;
}

/* Blue colour overlay – blurred */
.hero-overlay {
    position: absolute;
    inset: -4px;
    background: rgba(96, 165, 242, 0.35);
    filter: blur(2px);
    z-index: 1;
}

/* --- Header --- */
.header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 29px 40px;
}

.module-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 29px 40px;
}

/* Logo */
img.logo-image {
    max-width: 25%;
    height: auto;
}

/* Welcome greeting */
.welcome-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20.68px;
    color: #ffffff;
    letter-spacing: 0.69px;
}

/* --- Main Content --- */
.main-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 15vh;
}

/* Title */
.title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 54.22px;
    color: #ffffff;
    text-align: center;
    text-shadow: 0px 8px 5.8px rgba(0, 0, 0, 0.25);
    letter-spacing: 2.85px;
    white-space: nowrap;
}

/* Start Button */
.start-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 389px;
    max-width: 90%;
    height: 112px;
    background: #ffffff;
    border: none;
    border-radius: 56px;
    box-shadow: 0px 8px 4px -1px rgba(0, 0, 0, 0.25);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 35.09px;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.29px;
    line-height: 46.79px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0px 12px 8px -2px rgba(0, 0, 0, 0.3);
}

.start-button:active {
    transform: translateY(1px);
    box-shadow: 0px 4px 2px -1px rgba(0, 0, 0, 0.25);
}

/* --- Footer --- */
.footer {
    background: #ffffff;
    padding: 30px 26px 24px;
}

.footer-line {
    width: 100%;
    max-width: 782px;
    margin: 0 auto 12px;
    line-height: 0;
}

.footer-line svg {
    display: block;
    width: 100%;
    height: 1px;
}

.footer-nav {
    display: flex;
    justify-content: center;
}

.nav-item {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-size: 14px;
    line-height: 16.95px;
    color: #486284;
    text-decoration: none;
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.nav-item:hover {
    opacity: 0.7;
}

/* ============================================
   Module Page Styles
   ============================================ */

/* --- Module Page Container --- */
.module-page {
    background: #ffffff;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.module-page > * {
    width: 100%;
}

/* --- Progress Bar --- */
.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 370px;
}

.progress-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 15.652px;
    color: #97c7fc;
    letter-spacing: 0.52px;
    white-space: nowrap;
}

.progress-track {
    flex: 1;
    height: 14px;
    background: #eeeeee;
    border-radius: 7px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #97c7fc;
    border-radius: 7px;
    transition: width 0.4s ease;
}


/* --- Module Body --- */
.module-body {
    flex: 1;
    padding: 0 40px 30px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* --- Back Button --- */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 21.818px;
    color: #b4b4b4;
    text-decoration: none;
    letter-spacing: 0.73px;
    cursor: pointer;
    margin-bottom: 8px;
    border: none;
    background: none;
    padding: 0;
}

.back-button .back-chevron {
    font-size: 18px;
    line-height: 1;
}

/* --- Section Title (Module title & Knowledge Check) --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.diamond-icon {
    width: 22px;
    height: 22px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.diamond-icon-gold {
    border: 2.5px solid #f5c542;
    background: #f5c542;
}

.diamond-icon-blue {
    border: 2.5px solid #97C7FC;
    background: #97C7FC;
}


.section-title h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 34.625px;
    line-height: 51px;
    color: #000000;
    letter-spacing: 2.684px;
    margin: 0;
}

/* --- Module Description --- */
.module-description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 33px;
    color: #000000;
    letter-spacing: 1px;
    margin-bottom: 30px;
    padding-left: 32px;
    max-width: 650px;
}

/* --- Module Image --- */
.module-image-wrapper {
    width: 100%;
    max-width: 754px;
    margin: 0 auto 0px;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.module-image-wrapper img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Teal strip for Module 1 */
.module-image-wrapper .teal-strip {
    width: 100%;
    height: 74px;
    background: #75d7d6;
    border-radius: 0 0 30px 30px;
}

.module-image-wrapper.no-bottom-radius {
    border-radius: 30px 30px 0 0;
}

.teal-strip-wrapper {
    width: 100%;
    max-width: 754px;
    margin: 0 auto;
}

.teal-strip-bar {
    width: 100%;
    height: 74px;
    background: #75d7d6;
    border-radius: 0 0 30px 30px;
}

.module-image-wrapper.rounded-all {
    border-radius: 30px;
}

/* --- Call 911 Banner (Module 2) --- */
.call-banner {
    width: 100%;
    max-width: 754px;
    height: 142px;
    background: #f72525;
    border-radius: 15px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    position: relative;
}

.call-banner-phone {
    width: 51px;
    height: 86px;
    background: white;
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-banner-phone-inner {
    width: 44px;
    height: 58px;
    background: #f72525;
}

.call-banner-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 52.646px;
    color: #ffffff;
    letter-spacing: 4.08px;
    line-height: 78px;
}

/* --- Knowledge Check Section --- */
.knowledge-check {
    margin-top: 50px;
}

.knowledge-question {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 26px;
    line-height: 45px;
    color: #000000;
    letter-spacing: 0.8px;
    margin-bottom: 25px;
    padding-left: 32px;
    max-width: 714px;
}

/* --- Answer Options --- */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 754px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
    padding: 20px 25px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
    min-height: 92px;
}

.answer-option:hover {
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

.answer-option.selected {
    border-color: #97c7fc;
}

.answer-option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.answer-option.incorrect {
    border-color: #AF59FF;
    background: #eddbfe;
}

.answer-checkbox {
    width: 40px;
    height: 40px;
    border: 0.5px solid #000000;
    border-radius: 6.667px;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.answer-option.selected .answer-checkbox {
    background: #97c7fc;
    border-color: #97c7fc;
}

.answer-option.correct .answer-checkbox {
    background: #4caf50;
    border-color: #4caf50;
}

.answer-option.incorrect .answer-checkbox {
    background: #AF59FF;
    border-color: #AF59FF;
}

.answer-checkbox .check-icon {
    display: none;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.answer-option.selected .answer-checkbox .check-icon,
.answer-option.correct .answer-checkbox .check-icon,
.answer-option.incorrect .answer-checkbox .check-icon {
    display: block;
}

.answer-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 23px;
    line-height: 45px;
    color: #000000;
    letter-spacing: 0.8px;
}

/* --- Feedback Message --- */
.feedback-message {
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    max-width: 754px;
    display: none;
}

.feedback-message.show {
    display: block;
}

.feedback-message.correct {
    background: #e8f5e9;
    color: #2e7d32;
}

.feedback-message.incorrect {
    background: #eddbfe;
    color: #AF59FF;
}

/* --- Next Button --- */
.next-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 70px;
    background: #97c7fc;
    border: none;
    border-radius: 35px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 30px auto;
    letter-spacing: 1px;
}

.next-button.show {
    display: flex;
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

/* --- Page Indicator --- */
.page-indicator {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 21.818px;
    color: #b4b4b4;
    letter-spacing: 0.73px;
    text-align: center;
    margin: 30px 0 10px;
}

/* --- Completion Screen --- */
.completion-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    gap: 30px;
    min-height: 60vh;
    max-width: 900px;
    margin: 0 auto;
}

.completion-screen h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #000;
    letter-spacing: 2px;
}

.completion-screen p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 36px;
    color: #333;
    max-width: 600px;
}

.completion-screen .score-display {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 64px;
    color: #97c7fc;
}

.restart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 80px;
    background: #97c7fc;
    border: none;
    border-radius: 40px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 26px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease;
    letter-spacing: 1px;
    text-decoration: none;
}

.restart-button:hover {
    transform: translateY(-2px);
}

.finaltest-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 80px;
    background: #AF59FF;
    border: none;
    border-radius: 40px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 26px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease;
    letter-spacing: 1px;
    text-decoration: none;
}

.finaltest-button:hover {
    transform: translateY(-2px);
}
/* ============================================
   Final Assessment Page Styles
   ============================================ */

.assessment-intro {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 20px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.assessment-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 34.625px;
    line-height: 51px;
    color: #000000;
    letter-spacing: 2.684px;
    margin-bottom: 10px;
}

.assessment-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 33px;
    color: #000000;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.assessment-encouragement {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 33px;
    color: #000000;
    letter-spacing: 1px;
    max-width: 618px;
    margin: 0 auto;
}

.assessment-question-block {
    margin-bottom: 50px;
}

.assessment-question-block .section-title h2 {
    font-size: 34.625px;
}

.assessment-submit-area {
    display: flex;
    justify-content: center;
    margin: 40px 0 30px;
}

.submit-assessment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 80px;
    background: #97c7fc;
    border: none;
    border-radius: 40px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 26px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 1px;
}

.submit-assessment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

.assessment-footer-nav {
    display: flex;
    justify-content: center;
    padding: 20px 0 30px;
    border-top: 1.589px solid rgba(58, 78, 106, 0.48);
    margin-top: 20px;
}

/* ============================================
   Result / Congratulations Page Styles
   ============================================ */

.result-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-bg {
    position: absolute;
    inset: 0;
    background: url('images/Final_result_bg.png') center top / cover no-repeat;
    z-index: 0;
}

.result-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(11, 39, 134, 0.4) 35%,
        rgba(25, 25, 123, 0.85) 60%,
        rgba(25, 25, 123, 0.95) 100%
    );
    z-index: 1;
}

.result-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 40px;
}

.result-congrats {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 74px;
    line-height: 81px;
    color: #ffffff;
    letter-spacing: 2.47px;
}

.result-message {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 39.574px;
    line-height: 62.658px;
    color: #ffffff;
    letter-spacing: 1.08px;
    max-width: 656px;
}

.result-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 165px;
    height: 50px;
    background: #ffffff;
    border-radius: 94px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16.944px;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.13px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 20px;
}

.result-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
}

.result-chevron {
    font-size: 18px;
    line-height: 1;
}

/* --- Responsive --- */

/* ---- Desktop (1024px and up) ---- */
@media (min-width: 1024px) {
    .hero {
        min-height: 100vh;
    }

    .module-header {
        max-width: 900px;
        margin: 0 auto;
        width: 100%;
        padding: 29px 40px;
    }

    .module-body {
        max-width: 900px;
        padding: 0 60px 40px;
    }

    .title {
        font-size: 52px;
        line-height: 68px;
        letter-spacing: 3px;
    }

    .start-button {
        width: 420px;
        height: 112px;
        font-size: 36px;
    }

    .section-title h2 {
        font-size: 36px;
    }

    .module-description {
        font-size: 21px;
        line-height: 35px;
        max-width: 750px;
    }

    .knowledge-question {
        font-size: 24px;
        line-height: 42px;
        max-width: 750px;
    }

    .answer-text {
        font-size: 22px;
        line-height: 38px;
    }

    .answer-option {
        max-width: 780px;
    }

    .answer-options {
        max-width: 780px;
    }

    .module-image-wrapper {
        max-width: 780px;
    }

    .teal-strip-wrapper {
        max-width: 780px;
    }

    .call-banner {
        max-width: 780px;
    }

    .completion-screen {
        max-width: 900px;
        margin: 0 auto;
    }

    .result-congrats {
        font-size: 74px;
        line-height: 81px;
    }

    .result-message {
        font-size: 36px;
        line-height: 56px;
    }

    .next-button {
        width: 320px;
        height: 75px;
        font-size: 26px;
    }

    .footer {
        max-width: 100%;
    }
}

/* ---- Tablet (601px – 1023px) ---- */
@media (min-width: 601px) and (max-width: 1023px) {
    .module-header {
        padding: 25px 30px;
    }

    .module-body {
        padding: 0 30px 30px;
    }

    .title {
        font-size: 40px;
        line-height: 54px;
        white-space: normal;
    }

    .section-title h2 {
        font-size: 30px;
        line-height: 44px;
    }

    .module-description {
        font-size: 18px;
        line-height: 30px;
    }

    .knowledge-question {
        font-size: 22px;
        line-height: 38px;
    }

    .answer-text {
        font-size: 20px;
        line-height: 36px;
    }

    .result-congrats {
        font-size: 56px;
        line-height: 64px;
    }

    .result-message {
        font-size: 30px;
        line-height: 46px;
    }
}

/* ---- Mobile (600px and below) ---- */
@media (max-width: 600px) {
    .header {
        padding: 20px 20px;
    }

    .logo-text {
        font-size: 18px;
    }

    .welcome-text {
        font-size: 16px;
    }

    .title {
        font-size: 28px;
        line-height: 38px;
        letter-spacing: 1.5px;
        white-space: normal;
    }

    .start-button {
        width: 300px;
        height: 80px;
        font-size: 26px;
        border-radius: 40px;
    }

    .main-content {
        gap: 10vh;
    }

    /* Module responsive */
    .module-header {
        padding: 20px 20px;
    }

    .module-body {
        padding: 0 20px 20px;
    }

    .section-title h2 {
        font-size: 24px;
        line-height: 36px;
        letter-spacing: 1.5px;
    }

    .diamond-icon {
        width: 16px;
        height: 16px;
    }

    .module-description {
        font-size: 16px;
        line-height: 27px;
        padding-left: 26px;
    }

    .knowledge-question {
        font-size: 20px;
        line-height: 36px;
        padding-left: 26px;
    }

    .answer-text {
        font-size: 18px;
        line-height: 32px;
    }

    .answer-option {
        padding: 16px 20px;
        gap: 14px;
        min-height: 72px;
    }

    .answer-checkbox {
        width: 32px;
        height: 32px;
    }

    .call-banner {
        height: 100px;
        gap: 14px;
    }

    .call-banner-text {
        font-size: 36px;
    }

    .call-banner-phone {
        width: 40px;
        height: 68px;
    }

    .progress-label {
        font-size: 13px;
    }

    .back-button {
        font-size: 18px;
    }

    .page-indicator {
        font-size: 18px;
    }

    /* Assessment responsive */
    .assessment-title {
        font-size: 24px;
        line-height: 36px;
    }

    .assessment-subtitle {
        font-size: 18px;
        line-height: 28px;
    }

    .assessment-encouragement {
        font-size: 16px;
        line-height: 26px;
    }

    .submit-assessment-btn {
        width: 260px;
        height: 65px;
        font-size: 22px;
    }

    /* Result responsive */
    .result-congrats {
        font-size: 40px;
        line-height: 48px;
    }

    .result-message {
        font-size: 22px;
        line-height: 34px;
    }
}

@media (max-width: 380px) {
    .title {
        font-size: 22px;
        line-height: 32px;
    }

    .start-button {
        width: 250px;
        height: 65px;
        font-size: 22px;
        border-radius: 33px;
    }
}
