/* MAPIMS Branding - Professional Healthcare Excellence */
/* Primary Colors: Red #E31837, White #FFFFFF */

:root {
    --mapims-red: #E31837;
    --mapims-red-dark: #B8142C;
    --mapims-red-light: #F04A5F;
    --mapims-red-gradient: linear-gradient(135deg, #E31837 0%, #B8142C 100%);
    --mapims-white: #FFFFFF;
    --mapims-light-grey: #F8F9FA;
    --mapims-grey: #E9ECEF;
    --mapims-dark-grey: #6C757D;
    --mapims-soft-black: #212529;
    --mapims-text: #212529;
    --mapims-text-light: #6C757D;
    --mapims-success: #28A745;
    --mapims-warning: #FFC107;
    --mapims-info: #17A2B8;
    --shadow-sm: 0 2px 8px rgba(227, 24, 55, 0.08);
    --shadow-md: 0 4px 16px rgba(227, 24, 55, 0.12);
    --shadow-lg: 0 8px 32px rgba(227, 24, 55, 0.16);
    --shadow-xl: 0 12px 48px rgba(227, 24, 55, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--mapims-white);
    color: var(--mapims-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.container > * {
    width: 100%;
}

/* ==================== HEADER ==================== */
.mapims-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-bottom: 2px solid rgba(227, 24, 55, 0.1);
    padding: 18px 0;
    box-shadow: 
        0 4px 20px rgba(227, 24, 55, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px) saturate(180%);
    width: 100%;
    border-top: 3px solid var(--mapims-red-gradient);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
}

.header-nav-wrapper > * {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-toggle {
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 
        0 4px 12px rgba(227, 24, 55, 0.25),
        0 2px 6px rgba(227, 24, 55, 0.15);
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.6;
}

.language-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}


.mapims-logo {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mapims-red);
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--mapims-red-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.8rem;
    color: var(--mapims-text-light);
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-nav a {
    color: var(--mapims-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    line-height: 1.6;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mapims-red);
    transition: var(--transition);
}


/* ==================== HERO SECTION ==================== */
.hero-section {
    background: linear-gradient(135deg, #E31837 0%, #B8142C 50%, #E31837 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: var(--mapims-white);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
        url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 28px;
    opacity: 0.98;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 48px;
    opacity: 0.95;
    line-height: 1.9;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.4s both;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    font-weight: 400;
}

.hero-trust {
    margin-top: 32px;
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-trust span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    font-weight: 500;
}

/* Hero section button - original white background with red styling */
.hero-section .cta-button {
    background: var(--mapims-white) !important;
    color: var(--mapims-red) !important;
    border: 3px solid var(--mapims-red) !important;
    box-shadow: 
        0 6px 20px rgba(227, 24, 55, 0.25),
        0 3px 10px rgba(227, 24, 55, 0.15) !important;
}

.hero-section .cta-button span {
    color: var(--mapims-red) !important;
}

.hero-section .cta-button::before {
    background: var(--mapims-red) !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== BUTTONS ==================== */
.cta-button, .cta-button-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #085C2E !important;
    color: var(--mapims-white) !important;
    padding: 18px 44px;
    border: 3px solid #085C2E;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.8px;
    box-shadow: 
        0 6px 20px rgba(8, 92, 46, 0.25),
        0 3px 10px rgba(8, 92, 46, 0.15);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease 0.6s both;
    z-index: 1;
    min-height: 58px;
    line-height: 1.5;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.cta-button::before, .cta-button-large::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 1;
}

.cta-button span, .cta-button-large span {
    position: relative;
    z-index: 10;
    display: inline-block;
    text-align: center;
    pointer-events: none;
    color: var(--mapims-white) !important;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.cta-button-large {
    padding: 18px 50px;
    font-size: 1.2rem;
}

.btn-next, .btn-back, .btn-submit {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    min-width: 140px;
    text-align: center;
}

.btn-next, .btn-submit {
    background: #085C2E;
    color: var(--mapims-white);
    box-shadow: 
        0 8px 25px rgba(8, 92, 46, 0.35),
        0 4px 12px rgba(8, 92, 46, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-next::before, .btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}


.btn-next:active, .btn-submit:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 16px rgba(8, 92, 46, 0.3),
        0 2px 8px rgba(8, 92, 46, 0.2);
}

.btn-back {
    background: var(--mapims-grey);
    color: var(--mapims-text);
}


/* ==================== SECTIONS ==================== */
.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--mapims-text);
    text-align: center;
    margin: 0 auto 56px;
    letter-spacing: -0.8px;
    position: relative;
    padding-bottom: 20px;
    width: 100%;
    max-width: 900px;
    background: linear-gradient(135deg, var(--mapims-text) 0%, var(--mapims-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: var(--mapims-red-gradient);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(227, 24, 55, 0.3);
}

.benefits-section, .risks-section, .how-it-works-section {
    padding: 80px 0;
    background: var(--mapims-light-grey);
    width: 100%;
}

.benefits-section .container,
.risks-section .container,
.how-it-works-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.benefits-grid, .risks-grid, .steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 48px;
    width: 100%;
    justify-items: center;
    align-items: stretch;
}

.benefit-card, .risk-card, .step-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 
        0 4px 20px rgba(227, 24, 55, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-top: 5px solid var(--mapims-red);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid rgba(227, 24, 55, 0.1);
    height: 100%;
}

.benefit-card::before, .risk-card::before, .step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(227, 24, 55, 0.05), transparent);
    transition: left 0.5s;
    z-index: 0;
    pointer-events: none;
}


.benefit-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(227, 24, 55, 0.2));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}


.benefit-card h3, .risk-card h3 {
    color: var(--mapims-red);
    margin-bottom: 14px;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.benefit-card p, .risk-card p {
    color: var(--mapims-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.step-number {
    width: 70px;
    height: 70px;
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 
        0 8px 25px rgba(227, 24, 55, 0.3),
        0 4px 12px rgba(227, 24, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.step-number::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--mapims-red), #ff4757);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}


.step-card h3 {
    color: var(--mapims-text);
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.step-card p {
    color: var(--mapims-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    flex: 1;
    margin: 0;
}

/* ==================== TRUST SECTION ==================== */
.trust-section {
    padding: 80px 0;
    background: var(--mapims-white);
    text-align: center;
}

.trust-title {
    font-size: 2.4rem;
    color: var(--mapims-text);
    margin-bottom: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.trust-message {
    font-size: 1.05rem;
    color: var(--mapims-text);
    max-width: 900px;
    margin: 0 auto 24px;
    line-height: 1.9;
    font-weight: 400;
}

/* ==================== TESTIMONIALS ==================== */
.testimonials-section {
    padding: 80px 0;
    background: var(--mapims-light-grey);
    width: 100%;
}

.testimonials-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 48px;
    width: 100%;
    justify-items: center;
    align-items: start;
}

.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 40px;
    border-radius: 16px;
    border-left: 5px solid var(--mapims-red);
    box-shadow: 
        0 6px 20px rgba(227, 24, 55, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 4rem;
    color: var(--mapims-red);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
}


.testimonial-text {
    font-style: normal;
    margin-bottom: 20px;
    color: var(--mapims-text);
    line-height: 1.8;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    color: var(--mapims-red);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

/* ==================== FAQ ==================== */
.faq-section {
    padding: 80px 0;
    background: var(--mapims-white);
    width: 100%;
}

.faq-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.faq-list {
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

.faq-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 32px;
    margin-bottom: 20px;
    border-radius: 14px;
    border-left: 5px solid var(--mapims-red);
    box-shadow: 
        0 4px 15px rgba(227, 24, 55, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(227, 24, 55, 0.1);
}


.faq-item h3 {
    color: var(--mapims-red);
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--mapims-text-light);
    line-height: 1.8;
    font-size: 0.95rem;
    margin: 0;
}

/* ==================== ASSESSMENT FORM ==================== */
.assessment-main {
    padding: 30px 0 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #fef2f2 100%);
    min-height: calc(100vh - 200px);
    position: relative;
    overflow: hidden;
}

.assessment-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(227, 24, 55, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(227, 24, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.assessment-main .container {
    position: relative;
    z-index: 1;
}

.assessment-container {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 50%, #ffffff 100%);
    background-size: 200% 200%;
    animation: subtleGradient 10s ease infinite;
    border-radius: 28px;
    padding: 52px;
    box-shadow: 
        0 25px 70px rgba(227, 24, 55, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(227, 24, 55, 0.05);
    max-width: 900px;
    margin: 0 auto;
    border: 2px solid rgba(227, 24, 55, 0.15);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(180%);
}

@keyframes subtleGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.assessment-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--mapims-red) 0%, 
        #ff4757 50%, 
        var(--mapims-red) 100%);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(227, 24, 55, 0.3);
}

.assessment-container::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(227, 24, 55, 0.02) 0%, transparent 70%);
    animation: pulse-bg 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse-bg {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
    padding: 0 10px;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.progress-bar::-webkit-scrollbar {
    display: none;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 50px;
    right: 50px;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--mapims-grey) 0%, 
        rgba(227, 24, 55, 0.2) 50%, 
        var(--mapims-grey) 100%);
    z-index: 0;
    border-radius: 4px;
    pointer-events: none;
    transition: all 0.5s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 50px;
    max-width: 100%;
}

.step-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--mapims-text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid var(--mapims-white);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.step-circle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--mapims-red), #ff4757);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-step.active .step-circle {
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    box-shadow: 
        0 10px 30px rgba(227, 24, 55, 0.4),
        0 5px 15px rgba(227, 24, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 0 4px rgba(227, 24, 55, 0.1);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.9);
    border-width: 3px;
    animation: pulse-active 2s ease-in-out infinite;
}

.progress-step.active .step-circle::before {
    opacity: 1;
}

@keyframes pulse-active {
    0%, 100% { 
        box-shadow: 
            0 10px 30px rgba(227, 24, 55, 0.4),
            0 5px 15px rgba(227, 24, 55, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 0 4px rgba(227, 24, 55, 0.1);
        transform: scale(1.1);
    }
    50% { 
        box-shadow: 
            0 14px 38px rgba(227, 24, 55, 0.5),
            0 7px 20px rgba(227, 24, 55, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 0 6px rgba(227, 24, 55, 0.15);
        transform: scale(1.13);
    }
}

.progress-step.completed .step-circle {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: var(--mapims-white);
    box-shadow: 
        0 6px 20px rgba(40, 167, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.progress-step p {
    font-size: 0.75rem;
    color: var(--mapims-text-light);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    margin: 0;
    padding-top: 6px;
    white-space: normal;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.progress-step.active p {
    color: var(--mapims-red);
    font-weight: 600;
    font-size: 0.8rem;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--mapims-text) 0%, var(--mapims-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 auto 40px;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.5px;
    width: 100%;
    max-width: 100%;
    line-height: 1.3;
    position: relative;
    padding-bottom: 20px;
}

.step-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--mapims-red-gradient);
    border-radius: 2px;
}

.step-description {
    color: var(--mapims-text-light);
    font-size: 1rem;
    text-align: center;
    margin: -20px auto 40px;
    max-width: 600px;
    line-height: 1.7;
}

.form-group {
    margin-bottom: 28px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--mapims-text);
    margin-bottom: 10px;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
    line-height: 1.5;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 18px 22px;
    border: 2px solid var(--mapims-grey);
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    color: var(--mapims-text);
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.03),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
    position: relative;
}


.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--mapims-red);
    background: var(--mapims-white);
    box-shadow: 
        0 0 0 5px rgba(227, 24, 55, 0.15),
        0 6px 20px rgba(227, 24, 55, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transform: translateY(-3px);
    border-width: 3px;
}

/* Attractive Date Picker Styling */
.form-group input[type="date"] {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23E31837' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px 20px;
    padding-right: 50px;
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0;
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    z-index: 1;
}


.form-group input[type="date"]:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23E31837' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

/* Custom date picker calendar popup styling */
input[type="date"]::-webkit-datetime-edit-text {
    color: var(--mapims-text);
    padding: 0 4px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: var(--mapims-text);
    padding: 0 4px;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background-color: rgba(227, 24, 55, 0.1);
    color: var(--mapims-red);
    border-radius: 4px;
}

/* Firefox date picker styling */
.form-group input[type="date"] {
    color-scheme: light;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23212529' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    align-items: start;
}

/* Lifestyle fields 3-column grid */
.lifestyle-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 24px;
}

.lifestyle-fields-grid .form-group {
    margin-bottom: 0;
}

.lifestyle-fields-grid .form-group select {
    width: 100%;
    max-width: 100%;
}

.required {
    color: var(--mapims-red);
}

.bmi-display {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 20px 24px;
    border-radius: 12px;
    border-left: 4px solid var(--mapims-red);
    margin-bottom: 24px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(227, 24, 55, 0.1);
    animation: fadeIn 0.4s ease;
}

.bmi-display p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--mapims-text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.6;
}

.bmi-display strong {
    color: var(--mapims-red);
    font-size: 1.2rem;
}

.symptom-categories {
    margin-top: 24px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.tag {
    background: var(--mapims-light-grey);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
}


/* ==================== SYMPTOM & CONDITION QUESTION CARDS ==================== */
.symptoms-grid,
.medical-conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.family-history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
    max-width: 100%;
}

/* Family History Grid - Special Radio Button Layout */
/* Matches the image: Yes/No on same line, Not sure centered below */
.family-history-grid .condition-question-card .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    justify-content: space-between;
    align-items: flex-start;
}

.family-history-grid .condition-question-card .radio-label {
    flex: 0 1 auto;
    min-width: 80px;
    padding: 12px 16px;
}

/* Yes and No on same line - each takes ~50% width */
.family-history-grid .condition-question-card .radio-label:first-child,
.family-history-grid .condition-question-card .radio-label:nth-child(2) {
    flex: 0 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
}

/* Not sure on new line, centered - takes full width but content centered */
.family-history-grid .condition-question-card .radio-label:nth-child(3) {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .family-history-grid {
        grid-template-columns: 1fr;
    }
    
    .family-history-grid .condition-question-card .radio-label:first-child,
    .family-history-grid .condition-question-card .radio-label:nth-child(2) {
        flex: 0 1 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }
    
    .family-history-grid .condition-question-card .radio-label:nth-child(3) {
        flex: 0 1 100%;
        width: 100%;
        justify-content: center;
    }
}

.symptom-question-card,
.condition-question-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 18px 16px;
    border-radius: 12px;
    border: 2px solid var(--mapims-grey);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.05),
        0 2px 6px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.symptom-question-card:hover,
.condition-question-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(227, 24, 55, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(227, 24, 55, 0.3);
}

.symptom-question-card::before,
.condition-question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(227, 24, 55, 0.05), transparent);
    transition: left 0.5s ease;
}


.symptom-label,
.condition-label {
    display: block;
    font-weight: 600;
    color: var(--mapims-text);
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.symptom-question-card .radio-group,
.condition-question-card .radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.symptom-question-card .radio-label,
.condition-question-card .radio-label,
.form-group .radio-label {
    /* Inherit all base styles from .radio-label */
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--mapims-grey);
    flex: 1;
    min-width: 100px;
    justify-content: center;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: visible;
    pointer-events: auto;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.5;
}

.condition-question-card .radio-label {
    min-width: 100px;
    overflow: visible;
    white-space: normal;
}

/* Ensure consistent radio input styling for condition cards and form-group */
.symptom-question-card .radio-label input[type="radio"],
.condition-question-card .radio-label input[type="radio"],
.form-group .radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #66BB6A;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--mapims-grey);
    border-radius: 50%;
    background: var(--mapims-white);
    transition: all 0.2s ease;
}

.symptom-question-card .radio-label input[type="radio"]:checked,
.condition-question-card .radio-label input[type="radio"]:checked,
.form-group .radio-label input[type="radio"]:checked {
    border-color: #66BB6A;
    background: var(--mapims-white);
    box-shadow: 0 0 0 2px rgba(8, 92, 46, 0.15);
}

.symptom-question-card .radio-label input[type="radio"]:checked::after,
.condition-question-card .radio-label input[type="radio"]:checked::after,
.form-group .radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #66BB6A;
    box-shadow: 0 1px 2px rgba(8, 92, 46, 0.25);
}

/* Ensure consistent selected state for condition cards and form-group */
.symptom-question-card .radio-label:has(input[type="radio"]:checked),
.condition-question-card .radio-label:has(input[type="radio"]:checked),
.form-group .radio-label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(8, 92, 46, 0.1) 0%, rgba(8, 92, 46, 0.15) 100%);
    border-color: #66BB6A;
    border-width: 2px;
    box-shadow: 
        0 2px 8px rgba(8, 92, 46, 0.15),
        0 1px 4px rgba(8, 92, 46, 0.08);
}

.symptom-question-card .radio-label:has(input[type="radio"]:checked) span,
.condition-question-card .radio-label:has(input[type="radio"]:checked) span,
.form-group .radio-label:has(input[type="radio"]:checked) span {
    color: var(--mapims-text);
    font-weight: 600;
}

/* Note: .form-group .radio-label styles are defined after base .radio-label rules (around line 1776) */
/* to ensure proper CSS cascade and avoid conflicts */

/* ==================== VOICE INPUT ==================== */
.voice-input-container {
    position: relative;
    width: 100%;
}

.voice-input-container textarea {
    padding-right: 120px;
}

.voice-input-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: var(--mapims-light-grey);
    border: 2px solid var(--mapims-grey);
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mapims-text);
}


.voice-input-btn.recording {
    background: var(--mapims-red);
    color: var(--mapims-white);
    border-color: var(--mapims-red);
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(227, 24, 55, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(227, 24, 55, 0);
    }
}

.voice-status {
    margin-top: 12px;
    padding: 12px;
    background: var(--mapims-light-grey);
    border-radius: 8px;
    border-left: 4px solid var(--mapims-red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.voice-status span {
    color: var(--mapims-red);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-stop-recording {
    background: var(--mapims-red);
    color: var(--mapims-white);
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}


/* ==================== DYNAMIC SECTIONS ==================== */
.dynamic-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--mapims-grey);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#youngChildFields,
#adolescentFields {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-subtitle {
    font-size: 1.35rem;
    color: var(--mapims-red);
    margin-bottom: 24px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mapims-grey);
    line-height: 1.5;
}

.section-description {
    color: var(--mapims-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--mapims-grey);
    flex: 1;
    min-width: 100px;
    justify-content: center;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: visible;
    pointer-events: auto;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.5;
}

.radio-label span {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: clip;
}

.radio-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    pointer-events: none;
    z-index: 0;
}


.radio-label input[type="radio"]:checked + span {
    color: var(--mapims-text);
    font-weight: 600;
}

.radio-label input[type="radio"]:checked ~ span {
    color: var(--mapims-text);
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) span {
    color: var(--mapims-text);
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(8, 92, 46, 0.1) 0%, rgba(8, 92, 46, 0.15) 100%);
    border-color: #66BB6A;
    border-width: 2px;
    box-shadow: 
        0 2px 8px rgba(8, 92, 46, 0.15),
        0 1px 4px rgba(8, 92, 46, 0.08);
}

.radio-label:has(input[type="radio"]:checked)::before {
    display: none;
}

/* Base radio input styling - ensures all radio buttons look consistent */
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #66BB6A;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--mapims-grey);
    border-radius: 50%;
    background: var(--mapims-white);
    transition: all 0.2s ease;
}

.radio-label input[type="radio"]:checked {
    border-color: #66BB6A;
    background: var(--mapims-white);
    box-shadow: 0 0 0 2px rgba(8, 92, 46, 0.15);
}

.radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #66BB6A;
    box-shadow: 0 1px 2px rgba(8, 92, 46, 0.25);
}

/* ==================== FORM-GROUP RADIO BUTTONS ==================== */
/* Note: .form-group .radio-label styles are included in the shared selectors above */
/* (with .condition-question-card .radio-label) to ensure exact matching */
/* Only unselected state overrides are kept here for clarity */

/* Ensure unselected state is explicitly white */
.form-group .radio-label input[type="radio"]:not(:checked) {
    border-color: var(--mapims-grey);
    background: var(--mapims-white);
}

.form-group .radio-label input[type="radio"]:not(:checked)::after {
    content: none;
    display: none;
}

.form-group .radio-label:not(:has(input[type="radio"]:checked)) {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-color: var(--mapims-grey);
    border-width: 2px;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Button styles consolidated - see general button styles above */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--mapims-grey);
    width: 50%;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}


.checkbox-label:has(input[type="checkbox"]:checked),
.checkbox-label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(8, 92, 46, 0.1) 0%, rgba(8, 92, 46, 0.15) 100%);
    border-color: #66BB6A;
    box-shadow: 
        0 4px 12px rgba(8, 92, 46, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    width: 10px;
    height: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #66BB6A;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--mapims-grey);
    border-radius: 4px;
    background: var(--mapims-white);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


.checkbox-label input[type="checkbox"]:checked,
.checkbox-label input[type="radio"]:checked {
    background: #66BB6A;
    border-color: #66BB6A;
    box-shadow: 
        0 2px 8px rgba(8, 92, 46, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-label input[type="radio"] {
    border-radius: 50%;
}

.checkbox-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
    font-size: 0.95rem;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: var(--mapims-white);
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--mapims-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

.loading-overlay p {
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== ANALYSIS PAGE ==================== */
.analysis-main {
    padding: 50px 0;
    background: linear-gradient(180deg, var(--mapims-light-grey) 0%, var(--mapims-white) 100%);
    min-height: calc(100vh - 200px);
}

.analysis-container {
    background: var(--mapims-white);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--mapims-grey);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.analysis-actions {
    text-align: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--mapims-grey);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.analysis-actions .cta-button {
    display: inline-block;
    min-width: 280px;
    text-align: center;
    white-space: nowrap;
    margin: 0 auto;
    box-sizing: border-box;
    max-width: 100%;
}

.page-title {
    font-size: 2.8rem;
    color: var(--mapims-text);
    text-align: center;
    margin: 0 auto 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.page-subtitle {
    text-align: center;
    color: var(--mapims-text-light);
    margin: 0 auto 48px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.risk-score-card {
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 40px;
    border: 3px solid;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.risk-score-card h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.risk-score-card #riskScoreValue {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.risk-score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.risk-score-card.low {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-color: #4CAF50;
    color: #2E7D32;
}

.risk-score-card.moderate {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-color: #FF9800;
    color: #E65100;
}

.risk-score-card.high, .risk-score-card.critical {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-color: var(--mapims-red);
    color: var(--mapims-red-dark);
}

.health-risks-section {
    margin: 48px 0;
}

.risks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 32px;
    align-items: stretch;
}

.risk-item {
    background: var(--mapims-light-grey);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--mapims-red);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 140px;
    align-items: flex-start;
    justify-content: flex-start;
}


.risk-item h4 {
    color: var(--mapims-red);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.risk-item p {
    color: var(--mapims-text);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.reasoning-box {
    background: linear-gradient(135deg, var(--mapims-light-grey) 0%, var(--mapims-white) 100%);
    padding: 32px;
    border-radius: 12px;
    border-left: 4px solid var(--mapims-red);
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.reasoning-box h3 {
    color: var(--mapims-red);
    margin-bottom: 16px;
    font-size: 1.3rem;
    font-weight: 600;
}

.reasoning-box p {
    color: var(--mapims-text);
    line-height: 1.9;
    font-size: 1rem;
    margin: 0;
}

/* ==================== ML ANALYSIS SECTION ==================== */
.ml-analysis-section {
    margin-top: 48px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px solid var(--mapims-grey);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: block !important;
    visibility: visible !important;
}

.ml-analysis-section h3 {
    color: var(--mapims-red);
    font-size: 1.8rem;
    margin-bottom: 32px;
    text-align: center;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.ml-modules-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 28px;
    margin-bottom: 32px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    visibility: visible !important;
}

.ml-module-card {
    background: var(--mapims-white) !important;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid var(--mapims-grey);
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    display: flex !important;
    flex-direction: column;
    min-height: 280px;
    visibility: visible !important;
    opacity: 1 !important;
}

.ml-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--mapims-grey);
    border-radius: 16px 16px 0 0;
}

/* Risk level top border colors - 3 categories only */
.ml-module-card.high::before {
    background: var(--mapims-red);
}

.ml-module-card.moderate::before {
    background: var(--mapims-warning);
}

.ml-module-card.low::before {
    background: var(--mapims-success);
}


.ml-module-card h4 {
    color: var(--mapims-red) !important;
    font-size: 1.4rem;
    margin-bottom: 24px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    padding-top: 8px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    visibility: visible !important;
}

.ml-score {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid var(--mapims-grey);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--mapims-red);
    line-height: 1;
    display: none; /* Hide numeric score */
}

.score-level {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Score level badge colors - 3 categories only */
.ml-module-card.high .score-level {
    background: linear-gradient(135deg, #E31837 0%, #B8142C 100%);
    color: var(--mapims-white);
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.3);
}

.ml-module-card.moderate .score-level {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: var(--mapims-soft-black);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.ml-module-card.low .score-level {
    background: linear-gradient(135deg, #28A745 0%, #20C997 100%);
    color: var(--mapims-white);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.ml-confidence {
    color: var(--mapims-text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 500;
    padding: 12px;
    background: var(--mapims-light-grey);
    border-radius: 8px;
    text-align: center;
    border-left: 3px solid var(--mapims-red);
}

.ml-tests {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--mapims-grey);
    flex-grow: 1;
}

.ml-tests strong {
    color: var(--mapims-text);
    font-size: 1rem;
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--mapims-red);
}

.ml-tests ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ml-tests li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--mapims-text);
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.ml-tests li:hover {
    color: var(--mapims-red);
}

.ml-tests li::before {
    content: '✓';
    position: absolute;
    left: 4px;
    color: var(--mapims-red);
    font-weight: 700;
    font-size: 1rem;
    top: 8px;
}

.ml-overall-confidence {
    text-align: center;
    margin-top: 32px;
    padding: 20px;
    border-top: 2px solid var(--mapims-grey);
    background: var(--mapims-white);
    border-radius: 12px;
    color: var(--mapims-text);
    font-size: 1.15rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--mapims-red);
}

.priority-factors {
    margin-top: 40px;
    background: var(--mapims-light-grey);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--mapims-red);
    box-shadow: var(--shadow-sm);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.priority-factors h3 {
    color: var(--mapims-red);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.priority-factors ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 0;
}

.priority-factors li {
    padding: 14px 18px;
    background: var(--mapims-white);
    border-radius: 8px;
    border-left: 3px solid var(--mapims-red);
    transition: var(--transition);
    font-weight: 500;
}


/* ==================== PACKAGES PAGE ==================== */
.packages-main {
    padding: 50px 0 100px;
    background: linear-gradient(180deg, var(--mapims-light-grey) 0%, var(--mapims-white) 100%);
    min-height: calc(100vh - 200px);
    position: relative;
    overflow-x: hidden;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 48px;
    width: 100%;
    justify-items: center;
    align-items: stretch;
}

/* Primary recommended package styling */
.package-card.primary-recommended {
    border: 3px solid #E31837 !important;
    box-shadow: 0 8px 32px rgba(227, 24, 55, 0.25) !important;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    transform: scale(1.02);
    position: relative;
}

.package-card.primary-recommended:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(227, 24, 55, 0.3) !important;
}

.package-card.primary-recommended .primary-recommended-badge {
    background: linear-gradient(135deg, #E31837 0%, #B8142C 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.3);
    letter-spacing: 0.5px;
}

.package-card.primary-recommended.selected .package-includes-list li {
    display: list-item !important;
}

.package-card.primary-recommended .btn-select-package.primary-selected {
    background: #28A745 !important;
    color: white !important;
    font-weight: 700;
}

.package-card.primary-recommended .btn-select-package.primary-selected:hover {
    background: #218838 !important;
}

.package-card {
    background: var(--mapims-white);
    border-radius: 16px;
    padding: 36px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--mapims-grey);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    max-width: 100%;
    min-height: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    cursor: pointer;
}

/* Make the entire card clickable - all child elements allow clicks to bubble */
.package-card {
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure text and other elements don't interfere with card clicks */
.package-card h3,
.package-card .package-price,
.package-card .package-description,
.package-card .package-duration,
.package-card .package-includes,
.package-card .package-includes h4,
.package-card .package-includes ul,
.package-card .package-includes li {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Button should be clickable */
.package-card .btn-select-package {
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--mapims-red-gradient);
    transform: scaleX(0);
    transition: var(--transition);
    z-index: 0;
    border-radius: 16px 16px 0 0;
}


.package-card.recommended {
    border-color: var(--mapims-red);
    border-width: 3px;
    background: linear-gradient(135deg, var(--mapims-white) 0%, var(--mapims-light-grey) 100%);
}

.package-card.recommended::before {
    transform: scaleX(1);
}

.package-card.selected {
    border-color: #28a745 !important;
    border-width: 3px !important;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08) 0%, rgba(40, 167, 69, 0.12) 100%) !important;
    box-shadow: 
        0 12px 40px rgba(40, 167, 69, 0.35),
        0 6px 20px rgba(40, 167, 69, 0.25),
        inset 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
    transform: scale(1.02) !important;
}

.package-card.selected::after {
    content: '✓';
    position: absolute;
    top: 20px;
    left: 20px;
    background: #28a745;
    color: var(--mapims-white);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    z-index: 11;
    animation: fadeIn 0.3s ease;
}

.package-card.selected.recommended .recommended-badge {
    top: 60px;
}

.package-card.selected::before {
    transform: scaleX(1);
    height: 8px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #28a745 100%);
}

.package-differences {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--mapims-grey);
    animation: slideDown 0.4s ease;
}

.differences-title {
    color: var(--mapims-red);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.differences-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.differences-list li {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    padding-left: 28px;
}

.differences-list li.unique-item {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.15) 100%);
    color: #155724;
    border-left: 3px solid #28a745;
}

.differences-list li.unique-item::before {
    content: '✓';
    position: absolute;
    left: 8px;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

.differences-list li.missing-item {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.15) 100%);
    color: #856404;
    border-left: 3px solid #ffc107;
}

.differences-list li.missing-item::before {
    content: '+';
    position: absolute;
    left: 8px;
    color: #ffc107;
    font-weight: bold;
    font-size: 1.1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommended-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

.package-name {
    font-size: 1.6rem;
    color: var(--mapims-red);
    margin-bottom: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.package-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--mapims-red);
    margin-bottom: 20px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.package-description {
    color: var(--mapims-text-light);
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

.package-duration {
    color: var(--mapims-text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.package-includes {
    margin: 28px 0;
    position: relative;
    z-index: 1;
}

.package-includes h4 {
    color: var(--mapims-red);
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.package-includes ul {
    list-style: none;
    padding-left: 0;
}

.package-includes li {
    padding: 10px 0;
    padding-left: 32px;
    position: relative;
    color: var(--mapims-text);
    line-height: 1.6;
    transition: var(--transition);
    z-index: 1;
}


.package-includes li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--mapims-red);
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-select-package {
    width: 100%;
    padding: 16px;
    background: #085C2E;
    color: var(--mapims-white);
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: auto;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 12px rgba(8, 92, 46, 0.3),
        0 2px 6px rgba(8, 92, 46, 0.2);
    position: relative;
    z-index: 1;
}

.package-card.selected .btn-select-package,
.btn-select-package.selected {
    background: #28A745 !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 
        0 4px 12px rgba(40, 167, 69, 0.3),
        0 2px 6px rgba(40, 167, 69, 0.2);
}

.package-card.selected .btn-select-package:hover,
.btn-select-package.selected:hover {
    background: #218838 !important;
}


.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.addon-card {
    background: var(--mapims-white);
    padding: 18px;
    border-radius: 10px;
    border: 2px solid var(--mapims-grey);
    transition: var(--transition);
}


.addon-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.addon-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #66BB6A;
}

.addon-name {
    flex: 1;
    font-weight: 500;
    color: var(--mapims-text);
}

.addon-price {
    color: var(--mapims-red);
    font-weight: 700;
    font-size: 1.05rem;
}

.package-actions {
    text-align: center;
    margin-top: 48px;
    margin-bottom: 60px;
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.btn-proceed-booking {
    display: inline-block;
    background: #085C2E;
    color: var(--mapims-white);
    padding: 18px 50px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    box-shadow: 
        0 8px 24px rgba(8, 92, 46, 0.35),
        0 4px 12px rgba(8, 92, 46, 0.25);
    position: relative;
    overflow: hidden;
    min-width: 250px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-proceed-booking span {
    position: relative;
    z-index: 2;
    display: block;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.btn-proceed-booking::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 1;
}


.btn-proceed-booking:active {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(8, 92, 46, 0.35),
        0 3px 10px rgba(8, 92, 46, 0.25);
}

.btn-proceed-booking:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==================== BOOKING PAGE ==================== */
.booking-main {
    padding: 50px 0;
    background: linear-gradient(180deg, var(--mapims-light-grey) 0%, var(--mapims-white) 100%);
    min-height: calc(100vh - 200px);
}

.booking-summary {
    background: var(--mapims-white);
    padding: 36px;
    border-radius: 16px;
    margin: 0 auto 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--mapims-grey);
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.booking-summary h2 {
    color: var(--mapims-red);
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-card {
    background: var(--mapims-light-grey);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--mapims-red);
    box-shadow: var(--shadow-sm);
}

.booking-form {
    background: var(--mapims-white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--mapims-grey);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.booking-form .cta-button {
    margin-top: 32px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.booking-form .cta-button span {
    position: relative;
    z-index: 10;
    color: var(--mapims-white) !important;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}


.form-section {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--mapims-grey);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    color: var(--mapims-red);
    margin-bottom: 28px;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Radio group styles - consistent across all forms */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Note: Base .radio-label styles are defined earlier in the file (around line 1470) */
/* These styles ensure consistency - the base definition applies to all radio labels */

/* Booking page specific radio button styling */
.booking-form .radio-label:has(input[type="radio"]:checked) {
    border-color: #66BB6A;
    border-width: 2px;
    background: linear-gradient(135deg, rgba(8, 92, 46, 0.1) 0%, rgba(8, 92, 46, 0.15) 100%);
    box-shadow: 
        0 2px 8px rgba(8, 92, 46, 0.15),
        0 1px 4px rgba(8, 92, 46, 0.08);
}

.booking-form .radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #66BB6A;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--mapims-grey);
    border-radius: 50%;
    background: var(--mapims-white);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease;
}


.booking-form .radio-label input[type="radio"]:checked {
    border-color: #66BB6A;
    background: var(--mapims-white);
    box-shadow: 0 0 0 2px rgba(8, 92, 46, 0.15);
}

.booking-form .radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #66BB6A;
    box-shadow: 0 1px 2px rgba(8, 92, 46, 0.25);
}

.payment-summary {
    background: var(--mapims-light-grey);
    padding: 28px;
    border-radius: 12px;
    margin-top: 24px;
    border: 1px solid var(--mapims-grey);
}

.payment-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--mapims-grey);
    font-size: 1rem;
}

.payment-row.total {
    border-top: 3px solid var(--mapims-red);
    border-bottom: none;
    margin-top: 16px;
    padding-top: 20px;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--mapims-red);
}

.payment-note {
    margin-top: 20px;
    color: var(--mapims-text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* ==================== CONFIRMATION PAGE ==================== */
.confirmation-main {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--mapims-light-grey) 0%, var(--mapims-white) 100%);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.confirmation-card {
    background: var(--mapims-white);
    padding: 64px 48px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
    border: 1px solid var(--mapims-grey);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.confirmation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--mapims-red-gradient);
    z-index: 0;
}

.success-icon {
    width: 120px;
    height: 120px;
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 32px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.5s ease;
    position: relative;
    z-index: 1;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirmation-title {
    font-size: 2.4rem;
    color: var(--mapims-text);
    margin-bottom: 12px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.confirmation-subtitle {
    font-size: 1.2rem;
    color: var(--mapims-red);
    margin-bottom: 32px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.confirmation-details {
    background: var(--mapims-light-grey);
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
    border-left: 4px solid var(--mapims-red);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.confirmation-message {
    margin: 32px 0;
    color: var(--mapims-text);
    line-height: 1.9;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.confirmation-actions {
    margin-top: 40px;
}

/* ==================== ADMIN PANEL ==================== */
.admin-body {
    background: var(--mapims-light-grey);
}

.admin-header {
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    padding: 20px 0;
    box-shadow: var(--shadow-md);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .mapims-logo {
    color: var(--mapims-white);
    -webkit-text-fill-color: var(--mapims-white);
}

.admin-header .tagline {
    color: rgba(255, 255, 255, 0.9);
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: var(--mapims-white);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: var(--transition);
}


.admin-main {
    padding: 40px 0;
}

.admin-page-title {
    font-size: 2.2rem;
    color: var(--mapims-text);
    margin-bottom: 32px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    width: 100%;
    justify-items: center;
    align-items: start;
}

.stat-card {
    background: var(--mapims-white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--mapims-red);
    text-align: center;
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.stat-card h3 {
    color: var(--mapims-text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--mapims-red);
    line-height: 1;
}

.admin-section {
    background: var(--mapims-white);
    padding: 36px;
    border-radius: 12px;
    margin: 0 auto 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--mapims-grey);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.admin-section h2 {
    color: var(--mapims-red);
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--mapims-grey);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--mapims-grey);
    font-size: 0.85rem;
}


.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.confirmed {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-badge.pending {
    background: #FFF3E0;
    color: #E65100;
}

.risk-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--mapims-light-grey);
    color: var(--mapims-red);
    text-transform: uppercase;
}

.top-packages, .top-symptoms {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: var(--mapims-light-grey);
    border-radius: 8px;
    border-left: 3px solid var(--mapims-red);
    transition: var(--transition);
}


.top-item .count {
    color: var(--mapims-red);
    font-weight: 700;
    font-size: 1.1rem;
}

.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mapims-light-grey) 0%, var(--mapims-white) 100%);
}

.admin-login-card {
    background: var(--mapims-white);
    padding: 56px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid var(--mapims-grey);
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: 80px 0;
    background: var(--mapims-red-gradient);
    color: var(--mapims-white);
    text-align: center;
}

.cta-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.cta-text {
    font-size: 1.15rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* CTA section button - original white background with red styling */
.cta-section .cta-button-large {
    background: var(--mapims-white) !important;
    color: var(--mapims-red) !important;
    border: 3px solid var(--mapims-red) !important;
    box-shadow: 
        0 6px 20px rgba(227, 24, 55, 0.25),
        0 3px 10px rgba(227, 24, 55, 0.15) !important;
}

.cta-section .cta-button-large span {
    color: var(--mapims-red) !important;
}

.cta-section .cta-button-large::before {
    background: var(--mapims-red) !important;
}

/* ==================== FOOTER ==================== */
.mapims-footer {
    background: var(--mapims-soft-black);
    color: var(--mapims-white);
    padding: 60px 0 24px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    color: var(--mapims-red-light);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition);
}


.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

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

/* Mobile First - Extra Small Devices (phones, 480px and down) */
@media (max-width: 480px) {
    .assessment-main {
        padding: 20px 0 40px;
    }
    
    .assessment-container {
        padding: 20px 10px;
        border-radius: 16px;
        margin: 0 2px;
        max-width: calc(100% - 4px);
        overflow: visible;
    }
    
    .step-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .step-description {
        font-size: 0.9rem;
        margin-bottom: 24px;
        padding: 0 8px;
    }
    
    .progress-bar {
        margin-bottom: 36px;
        padding: 0;
        gap: 0;
        justify-content: space-between;
        flex-wrap: nowrap;
        width: 100%;
        overflow: visible;
    }
    
    .progress-bar::before {
        top: 18px;
        left: 18px;
        right: 18px;
        height: 2px;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin-bottom: 4px;
        border-width: 2px;
    }
    
    .progress-step {
        min-width: 0;
        flex: 1 1 auto;
        max-width: none;
        padding: 0;
        overflow: visible;
    }
    
    .progress-step p {
        font-size: 0.52rem;
        padding-top: 2px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        text-align: center;
        overflow: visible;
        text-overflow: clip;
        min-height: 2.8em;
        display: block;
        width: 100%;
    }
    
    .progress-step.active .step-circle {
        transform: scale(1.08);
    }
    
    .progress-step.active p {
        font-size: 0.54rem;
        line-height: 1.35;
        font-weight: 600;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .lifestyle-fields-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .radio-label {
        min-width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
    }
    
    .checkbox-label {
        padding: 14px 16px;
    }
    
    .checkbox-label input[type="checkbox"],
    .checkbox-label input[type="radio"] {
        width: 18px;
        height: 18px;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: 12px;
        margin-top: 32px;
    }
    
    .btn-next,
    .btn-back,
    .btn-submit {
        width: 100%;
        padding: 16px 24px;
        font-size: 1rem;
        min-width: auto;
    }
    
    .btn-back {
        order: 2;
    }
    
    .btn-next,
    .btn-submit {
        order: 1;
    }
    
    .dynamic-section {
        margin-top: 28px;
        padding-top: 24px;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
    
    .section-description {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .bmi-display {
        padding: 16px;
        margin-bottom: 20px;
        font-size: 0.9rem;
    }
    
    .voice-input-btn {
        position: static;
        width: 100%;
        margin-top: 12px;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .voice-input-container textarea {
        padding-right: 16px;
        padding-bottom: 60px;
    }
    
    .category-tags {
        gap: 8px;
    }
    
    .tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .symptoms-grid,
    .medical-conditions-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .family-history-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    /* Maintain family history radio button layout on mobile */
    .family-history-grid .condition-question-card .radio-group {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: space-between;
    }
    
    .family-history-grid .condition-question-card .radio-label:first-child,
    .family-history-grid .condition-question-card .radio-label:nth-child(2) {
        flex: 0 1 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }
    
    .family-history-grid .condition-question-card .radio-label:nth-child(3) {
        flex: 0 0 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .symptom-question-card,
    .condition-question-card {
        padding: 16px 14px;
    }
    
    .symptom-question-card .radio-group,
    .condition-question-card .radio-group {
        flex-direction: column;
    }
    
    .symptom-question-card .radio-label,
    .condition-question-card .radio-label {
        min-width: auto;
        text-align: left;
        overflow: visible;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .condition-question-card .radio-label {
        min-width: 100%;
    }
    
    /* Analysis Page - Very Small Screens */
    .analysis-main {
        padding: 16px 0;
    }
    
    .analysis-container {
        padding: 16px 8px;
        margin: 0 4px;
        box-sizing: border-box;
        width: calc(100% - 8px);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
        margin-bottom: 24px;
    }
    
    .risk-score-card {
        padding: 20px 12px;
        margin-bottom: 20px;
    }
    
    .risk-score-card h2 {
        font-size: 1.1rem;
    }
    
    .risk-score-card #riskScoreValue {
        font-size: 1.2rem;
    }
    
    .health-risks-section h3 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }
    
    .risks-grid {
        gap: 12px;
    }
    
    .risk-item {
        padding: 16px 12px;
        min-height: 120px;
        display: flex;
        flex-direction: column;
    }
    
    .risk-item h4 {
        font-size: 0.95rem;
        flex-shrink: 0;
    }
    
    .risk-item p {
        font-size: 0.8rem;
        flex: 1;
    }
    
    .reasoning-box {
        padding: 16px 12px;
        margin: 24px 0;
        min-height: 120px;
        display: flex;
        flex-direction: column;
    }
    
    .reasoning-box h3 {
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .reasoning-box p {
        font-size: 0.85rem;
        flex: 1;
    }
    
    .ml-analysis-section {
        padding: 16px 8px;
        margin-top: 24px;
        border-radius: 12px;
        overflow-x: hidden;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    
    .ml-analysis-section h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
        line-height: 1.3;
        padding: 0 4px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .ml-modules-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .ml-module-card {
        padding: 16px 12px;
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .ml-module-card h4 {
        font-size: 0.95rem;
        margin-bottom: 12px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .ml-score {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .score-value {
        font-size: 1.6rem;
        line-height: 1;
    }
    
    .score-level {
        font-size: 0.8rem;
        padding: 5px 10px;
        align-self: flex-start;
    }
    
    .ml-confidence {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .ml-tests {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .ml-tests strong {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .ml-tests li {
        font-size: 0.75rem;
        padding: 4px 0;
        padding-left: 18px;
        line-height: 1.4;
    }
    
    .priority-factors {
        min-height: 120px;
        display: flex;
        flex-direction: column;
    }
    
    .priority-factors h3 {
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .priority-factors ul {
        flex: 1;
    }
    
    .priority-factors li {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
    
    .analysis-actions {
        margin-top: 24px;
        padding-top: 20px;
    }
    
    .analysis-actions .cta-button {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

/* Small Devices (landscape phones, 481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .assessment-main {
        padding: 30px 0 50px;
    }
    
    .assessment-container {
        padding: 32px 28px;
        border-radius: 18px;
        margin: 0 16px;
    }
    
    .step-title {
        font-size: 1.65rem;
        margin-bottom: 28px;
    }
    
    .progress-bar {
        margin-bottom: 36px;
        padding: 0 4px;
        gap: 4px;
        justify-content: space-between;
    }
    
    .progress-bar::before {
        top: 28px;
        left: 32px;
        right: 32px;
        height: 2px;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .progress-step {
        min-width: 60px;
        flex: 1 1 0;
        max-width: calc(16.66% - 4px);
    }
    
    .progress-step p {
        font-size: 0.63rem;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.25;
        overflow: visible;
        text-overflow: clip;
        min-height: 2.5em;
    }
    
    .form-group {
        margin-bottom: 22px;
    }
    
    .form-row {
        gap: 18px;
    }
    
    .lifestyle-fields-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    .form-actions {
        gap: 14px;
    }
    
    .btn-next,
    .btn-back,
    .btn-submit {
        padding: 14px 28px;
        min-width: 130px;
    }
    
    .radio-group {
        gap: 16px;
    }
    
    .radio-label {
        min-width: 110px;
        flex: 0 1 calc(50% - 8px);
    }
}

/* Medium Devices (tablets, 769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .assessment-container {
        padding: 36px;
        max-width: 800px;
    }
    
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .progress-bar::before {
        left: 55px;
        right: 55px;
    }
    
    .step-circle {
        width: 44px;
        height: 44px;
    }
}

/* General Mobile Styles (768px and down) */
@media (max-width: 768px) {
    .btn-proceed-booking {
        width: 90%;
        max-width: 400px;
        padding: 16px 32px;
        font-size: 1.1rem;
        min-height: 56px;
        margin: 0 auto;
        display: flex;
    }
    
    .package-actions {
        margin-bottom: 80px;
        padding: 30px 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .packages-main {
        padding-bottom: 120px;
    }
    
    .package-differences {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .differences-title {
        font-size: 0.95rem;
    }
    
    .differences-list li {
        font-size: 0.85rem;
        padding: 6px 10px;
        padding-left: 24px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .header-nav {
        display: none;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo img {
        height: 40px;
        flex-shrink: 0;
    }
    
    .mapims-logo {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .tagline {
        font-size: 0.7rem;
        margin-top: 2px;
    }
    
    .language-toggle {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-width: 90px;
    }
    
    .header-content {
        gap: 8px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid, .risks-grid, .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Analysis Page Mobile Styles */
    .analysis-main {
        padding: 20px 0;
        min-height: calc(100vh - 180px);
    }
    
    .analysis-container, .booking-form {
        padding: 24px 16px;
        box-sizing: border-box;
        overflow-x: hidden;
        margin: 0 8px;
        border-radius: 12px;
        width: calc(100% - 16px);
        max-width: 100%;
    }
    
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
        line-height: 1.3;
        padding: 0 4px;
    }
    
    .page-subtitle {
        font-size: 0.95rem;
        margin-bottom: 32px;
        padding: 0 4px;
        line-height: 1.5;
    }
    
    .risk-score-card {
        padding: 24px 16px;
        margin-bottom: 24px;
        border-radius: 12px;
    }
    
    .risk-score-card h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
        line-height: 1.4;
    }
    
    .risk-score-card #riskScoreValue {
        font-size: 1.4rem;
        display: block;
        margin-top: 8px;
        word-wrap: break-word;
    }
    
    .health-risks-section {
        margin: 32px 0;
    }
    
    .health-risks-section h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
        padding: 0 4px;
    }
    
    .risks-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
    }
    
    .risk-item {
        padding: 18px 16px;
        border-radius: 10px;
        border-left-width: 3px;
        min-height: 130px;
        display: flex;
        flex-direction: column;
    }
    
    .risk-item h4 {
        font-size: 1rem;
        margin-bottom: 10px;
        flex-shrink: 0;
    }
    
    .risk-item p {
        font-size: 0.85rem;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex: 1;
    }
    
    .reasoning-box {
        padding: 20px 16px;
        margin: 32px 0;
        border-radius: 10px;
        border-left-width: 3px;
        min-height: 130px;
        display: flex;
        flex-direction: column;
    }
    
    .reasoning-box h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        flex-shrink: 0;
    }
    
    .reasoning-box p {
        font-size: 0.9rem;
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex: 1;
    }
    
    .ml-analysis-section {
        margin-top: 32px;
        padding: 24px 16px;
        border-radius: 12px;
        overflow-x: hidden;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    
    .ml-analysis-section h3 {
        font-size: 1.3rem;
        margin-bottom: 24px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 0 4px;
    }
    
    .ml-modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .ml-module-card {
        padding: 20px 16px;
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .ml-module-card h4 {
        font-size: 1.1rem;
        margin-bottom: 16px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .ml-score {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
        margin-bottom: 12px;
        box-sizing: border-box;
        width: 100%;
    }
    
    .score-value {
        font-size: 2rem;
        line-height: 1;
    }
    
    .score-level {
        font-size: 0.95rem;
        padding: 6px 12px;
        align-self: flex-start;
    }
    
    .ml-confidence {
        font-size: 0.9rem;
        margin-bottom: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .ml-tests {
        margin-top: 12px;
        padding-top: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .ml-tests strong {
        font-size: 0.9rem;
        margin-bottom: 8px;
        display: block;
    }
    
    .ml-tests li {
        font-size: 0.85rem;
        padding: 5px 0;
        padding-left: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .ml-overall-confidence {
        font-size: 1rem;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .priority-factors {
        margin-top: 32px;
        min-height: 130px;
        display: flex;
        flex-direction: column;
    }
    
    .priority-factors h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
        flex-shrink: 0;
    }
    
    .priority-factors ul {
        grid-template-columns: 1fr;
        gap: 10px;
        flex: 1;
    }
    
    .priority-factors li {
        padding: 12px 16px;
        font-size: 0.9rem;
        border-left-width: 3px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .analysis-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        box-sizing: border-box;
        margin-top: 32px;
        padding-top: 24px;
    }
    
    .analysis-actions .cta-button {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        margin: 0;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 16px 20px;
        box-sizing: border-box;
        font-size: 1rem;
    }
    
    .analysis-actions .cta-button span {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        display: block;
        width: 100%;
    }
    
    .language-toggle {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .container {
        padding: 0 12px;
        overflow: visible;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: space-between;
    }
    
    .mapims-header {
        padding: 14px 0;
    }
    
    .logo > div {
        min-width: 0;
        flex: 1;
    }
    
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Touch-friendly targets */
    input, select, textarea, button, a {
        -webkit-tap-highlight-color: rgba(227, 24, 55, 0.1);
    }
    
    /* Prevent zoom on input focus (iOS) */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ==================== FASTING MODAL STYLES ==================== */

.fasting-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fasting-modal-content {
    background-color: var(--mapims-white);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fasting-modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--mapims-white);
    padding: 24px 28px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.fasting-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mapims-white);
}

.fasting-modal-close {
    background: none;
    border: none;
    color: var(--mapims-white);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}


.fasting-modal-body {
    padding: 32px 28px;
}

.fasting-icon {
    text-align: center;
    margin-bottom: 24px;
}

.fasting-icon-symbol {
    font-size: 64px;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.fasting-content h3 {
    color: #dc3545;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: center;
}

.fasting-instructions {
    margin-bottom: 28px;
}

.fasting-important {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.fasting-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fasting-list li {
    padding: 14px 0;
    padding-left: 32px;
    position: relative;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
}

.fasting-list li:last-child {
    border-bottom: none;
}

.fasting-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 14px;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d4edda;
    border-radius: 50%;
    font-size: 0.9rem;
}

.fasting-list li strong {
    color: #dc3545;
    font-weight: 600;
}

.fasting-list li.fasting-highlight {
    background-color: #fff3cd;
    border-left: 4px solid #dc3545;
    padding: 16px 0 16px 32px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-weight: 600;
}

.fasting-list li.fasting-highlight::before {
    background-color: #dc3545;
    color: white;
    content: '🕐';
    font-size: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fasting-note {
    margin-top: 24px;
    padding: 16px;
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.fasting-note p {
    margin: 0;
    color: #004085;
    font-size: 0.95rem;
    line-height: 1.6;
}

.fasting-note strong {
    color: #002752;
}

.fasting-consent {
    margin-top: 32px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.fasting-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.fasting-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: #dc3545;
    flex-shrink: 0;
}

.fasting-checkbox-label span {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.fasting-checkbox-label input[type="checkbox"]:checked + span {
    color: #28a745;
}

.fasting-modal-footer {
    padding: 20px 28px 28px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    background-color: var(--mapims-white);
    border-radius: 0 0 16px 16px;
}

.fasting-modal-footer .cta-button {
    min-width: 200px;
    background: #085C2E !important;
    color: var(--mapims-white) !important;
    border-color: #085C2E !important;
    position: relative;
    z-index: 2;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    overflow: visible !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Ensure button text is visible - text is directly in button, not in span */
.fasting-modal-footer .cta-button,
.fasting-modal-footer .cta-button * {
    color: var(--mapims-white) !important;
}

/* Hide the ::before pseudo-element that might cover text */
.fasting-modal-footer .cta-button::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}

.fasting-modal-footer .cta-button span {
    color: var(--mapims-white) !important;
    position: relative;
    z-index: 10;
}

/* Make sure the button text content is not hidden - specific ID selector */
#fastingConsentButton {
    color: var(--mapims-white) !important;
    background: #085C2E !important;
}

#fastingConsentButton::before {
    display: none !important;
    content: none !important;
}

.fasting-modal-footer .cta-button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed;
    pointer-events: none;
    background: #085C2E !important;
    color: var(--mapims-white) !important;
}

.fasting-modal-footer .cta-button:disabled,
.fasting-modal-footer .cta-button:disabled * {
    color: var(--mapims-white) !important;
}

.fasting-modal-footer .cta-button:disabled span {
    color: var(--mapims-white) !important;
}


.time-help-text {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ==================== SUCCESS MODAL ==================== */
.success-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.success-modal-content {
    background-color: var(--mapims-white);
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.success-modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: var(--mapims-white);
    padding: 24px 28px;
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.success-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--mapims-white);
}

.success-modal-body {
    padding: 32px 28px;
    text-align: center;
}

.success-icon-small {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: var(--mapims-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 24px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    animation: scaleIn 0.5s ease;
}

.success-modal-body h3 {
    color: var(--mapims-text);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 24px 0;
}

.transaction-details {
    background: var(--mapims-light-grey);
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
    border-left: 4px solid #28a745;
    text-align: left;
}

.transaction-details p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.transaction-details strong {
    color: var(--mapims-text);
    font-weight: 600;
}

.success-message {
    margin: 24px 0;
    color: var(--mapims-text);
    line-height: 1.7;
    font-size: 1rem;
    text-align: left;
}

.success-message p {
    margin: 0;
}

.success-modal-footer {
    padding: 20px 28px 28px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.success-modal-footer .cta-button {
    min-width: 200px;
    background: #085C2E !important;
    color: var(--mapims-white) !important;
    border-color: #085C2E !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 14px 32px;
}

/* Responsive styles for fasting modal */
@media (max-width: 768px) {
    .fasting-modal {
        padding: 10px;
    }
    
    .fasting-modal-content {
        max-height: 95vh;
    }
    
    .fasting-modal-header {
        padding: 20px;
    }
    
    .fasting-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .fasting-modal-body {
        padding: 24px 20px;
    }
    
    .fasting-content h3 {
        font-size: 1.2rem;
    }
    
    .fasting-list li {
        font-size: 0.95rem;
        padding-left: 28px;
    }
    
    .fasting-modal-footer {
        padding: 16px 20px 20px;
    }
    
    .fasting-modal-footer .cta-button {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .fasting-icon-symbol {
        font-size: 48px;
    }
    
    .fasting-modal-header h2 {
        font-size: 1.1rem;
    }
    
    .fasting-content h3 {
        font-size: 1.1rem;
    }
    
    .fasting-list li {
        font-size: 0.9rem;
        padding: 12px 0 12px 24px;
    }
    
    .fasting-checkbox-label span {
        font-size: 0.95rem;
    }
}

/* Responsive styles for success modal */
@media (max-width: 768px) {
    .success-modal {
        padding: 10px;
    }
    
    .success-modal-content {
        max-height: 95vh;
    }
    
    .success-modal-header {
        padding: 20px 24px;
    }
    
    .success-modal-header h2 {
        font-size: 1.4rem;
    }
    
    .success-modal-body {
        padding: 24px 20px;
    }
    
    .success-icon-small {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
        margin-bottom: 20px;
    }
    
    .success-modal-body h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .transaction-details {
        padding: 16px;
        margin: 20px 0;
    }
    
    .success-message {
        margin: 20px 0;
        font-size: 0.95rem;
    }
    
    .success-modal-footer {
        padding: 16px 20px 20px;
    }
    
    .success-modal-footer .cta-button {
        min-width: 100%;
        padding: 12px 24px;
    }
}

@media (max-width: 480px) {
    .success-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .success-modal-body h3 {
        font-size: 1.1rem;
    }
    
    .success-icon-small {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .transaction-details {
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .success-message {
        font-size: 0.9rem;
    }
}
