/* CACHE BUST v3.4 - Footer Links Added */
/* Natural Botanical Wellness Design - Updated Layout v2.0 */

/* Natural Botanical Wellness Design - Fonts loaded via base.html */

/* Color Palette - Natural Botanical Colors */
:root {
    --cream: #FAF7F2;
    --cream-2: #F4EFE9;
    --sage-50: #F0F4F1;
    --sage-200: #DDE7DF;
    --sage-400: #8DAA9D;
    --sage-600: #6F8B7B;
    --terracotta-50: #FDF5F2;
    --terracotta-400: #D9856A;
    --terracotta-600: #BF6B52;
    --brown-300: #A38C77;
    --brown-600: #6B5B4D;
    --ink: #2E2A27;
    --text-dark: #2E2A27;
    --text-medium: #6B5B4D;
    --text-light: #A38C77;
    --white: #FFFFFF;
    --success-soft: #F0F4F1;
    --success: #6F8B7B;
    --info-soft: #F0F4F1;
    --info: #8DAA9D;
    --warning-soft: #FFF6F1;
    --warning: #D9856A;
    --shadow-light: rgba(107, 91, 77, 0.12);
    --shadow-medium: rgba(107, 91, 77, 0.18);
    --primary-color: #4a6c6f; /* Sage green */
    --secondary-color: #e2a073; /* Terracotta */
    --background-color: #f8f9fa;
    --text-color: #333;
}

body {
    font-family: 'Source Serif Pro', Georgia, serif;
    background-color: var(--cream);
    background-image: 
        radial-gradient(circle at 20% 80%, var(--cream-2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--sage-50) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(163, 140, 119, 0.02) 2px,
            rgba(163, 140, 119, 0.02) 4px
        );
    color: var(--text-dark);
    line-height: 1.7;
    letter-spacing: 0.2px;
    min-height: 100vh;
}

body, html {
    height: auto; /* Allow natural height for scrolling */
    font-family: "Inter", sans-serif;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-width: 100vw; /* Ensure content doesn't exceed viewport width */
}

/* Global prevention of horizontal scrolling */
* {
    max-width: 100vw;
}

/* Ensure all containers respect viewport width */
.container, .container-fluid, .row, .col, [class*="col-"] {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Headings with modern serif font */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.3px;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Container and layout improvements */
.container-fluid {
    padding: 0 2rem;
}

.row {
    margin: 0 -1rem;
}

.col, [class*="col-"] {
    padding: 0 1rem;
}

/* Card styling with organic wellness feel */
.card {
    background: var(--white);
    border: 1px solid var(--sage-200);
    border-radius: 24px;
    box-shadow: 0 6px 24px var(--shadow-light);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Quiz card specific styling */
.quiz-card {
    display: flex;
    flex-direction: column;
    min-height: 520px; /* Consistent with other assessment pages */
    padding: 2.5rem 2rem; /* Standard padding */
    overflow: hidden; /* Enable scrolling within card */
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px var(--shadow-medium);
    border-color: var(--sage-400);
}

.card-header {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border: none;
    padding: 2.5rem 2rem 2rem;
    border-radius: 24px 24px 0 0 !important;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sage-600), var(--terracotta-400));
}

.card-header h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-medium);
    opacity: 0.9;
}

.card-body {
    padding: 2.5rem 2rem;
}

/* Header/Hero section with organic feel */
.hero-section {
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, var(--sage-600), var(--terracotta-400));
    border-radius: 2px;
}

.hero-section h1 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    position: relative;
}

.hero-section .lead {
    font-size: 1.3rem;
    color: var(--text-medium);
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Button styling with organic wellness feel */
.btn {
    border-radius: 28px;
    padding: 14px 36px;
    font-weight: 500;
    font-family: 'Fraunces', serif;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-transform: none;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

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

.btn-primary {
    background: var(--sage-600);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(111, 139, 123, 0.3);
    border-color: var(--sage-600);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(111, 139, 123, 0.4);
    background: var(--sage-400);
    border-color: var(--sage-400);
}

.btn-success {
    background: var(--terracotta-400);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(217, 133, 106, 0.3);
    border-color: var(--terracotta-400);
}

.btn-link {
    color: var(--sage-600);
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--sage-400);
    text-decoration: none;
}

/* Form styling with natural feel */
.form-control, .form-select {
    border: 2px solid var(--sage-200);
    border-radius: 18px;
    padding: 16px 22px;
    font-size: 1rem;
    background: var(--white);
    transition: all 0.3s ease;
    box-shadow: none;
    font-family: 'Source Serif Pro', Georgia, serif;
}

.form-control:focus, .form-select:focus {
    border-color: var(--sage-600);
    box-shadow: 0 0 0 0.2rem rgba(111, 139, 123, 0.15);
    background: var(--white);
}

.form-label {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* Assessment form styling with natural aesthetic */
.assessment-card {
    background: var(--white);
    border: 1px solid var(--sage-200);
    border-radius: 28px;
    padding: 3.5rem;
    box-shadow: 0 8px 32px var(--shadow-light);
    margin-bottom: 2rem;
    position: relative;
}

.assessment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--sage-600), var(--terracotta-400));
    border-radius: 28px 28px 0 0;
}

.form-section {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border-radius: 22px;
    border: 1px solid var(--sage-200);
    border-left: 4px solid var(--sage-600);
}

.form-section h4 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Checkbox and radio styling with organic feel */
.form-check {
    margin-bottom: 1rem;
    padding: 1.2rem;
    background: var(--white);
    border: 1px solid var(--sage-200);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.form-check:hover {
    background: var(--sage-50);
    border-color: var(--sage-400);
    transform: translateX(3px);
}

.form-check-input {
    width: 1.3em;
    height: 1.3em;
    border: 2px solid var(--sage-400);
    border-radius: 50%;
}

.form-check-input:checked {
    background: var(--sage-600);
    border-color: var(--sage-600);
}

.form-check-label {
    color: var(--text-dark);
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Science fact cards with organic styling */
.science-fact-card {
    background: var(--white);
    border: 1px solid var(--sage-200);
    border-radius: 20px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1.5rem;
    position: relative;
}

.science-fact-card:hover {
    background: var(--sage-50);
    border-color: var(--sage-400);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.science-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sage-200), var(--terracotta-400));
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    border: 2px solid var(--sage-400);
}

.science-icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--sage-600);
}

.science-fact-card h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.science-fact-card p {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.science-fact-card .fas.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: var(--sage-600);
}

.science-fact-card[aria-expanded="true"] .fas.fa-chevron-down {
    transform: translateY(-50%) rotate(180deg) !important;
}

/* Routine step cards with product card styling */
.routine-step-card {
    border: 1px solid var(--sage-200) !important;
    border-radius: 24px;
    box-shadow: 0 8px 28px var(--shadow-light);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: var(--white);
}

.routine-step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--shadow-medium), 0 0 0 1px var(--sage-400);
    border-color: var(--sage-400) !important;
}

.routine-step-card .card-header {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border: none;
    padding: 2.5rem;
    border-radius: 24px 24px 0 0 !important;
}

.step-number {
    background: var(--sage-600) !important;
    color: var(--white) !important;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(111, 139, 123, 0.3);
    border: 2px solid var(--sage-400);
}

.routine-step-card h5 {
    color: var(--text-dark);
    font-weight: 600;
}

.routine-step-card .text-muted {
    color: var(--text-medium) !important;
}

/* Instruction and product sections */
.instruction-section, .product-section {
    height: 100%;
    padding: 1.5rem;
}

.instruction-section {
    margin-bottom: 0 !important;
}

.instruction-section h6, .product-section h6 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.instruction-section .bg-light {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%) !important;
    border: 1px solid var(--sage-200);
    border-radius: 15px;
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 1.5rem;
    color: var(--text-dark) !important;
}

.instruction-section .bg-light p {
    color: var(--text-dark) !important;
    margin: 0;
    line-height: 1.5;
}

.product-section .bg-light {
    background: linear-gradient(135deg, var(--success-soft) 0%, var(--cream-2) 100%) !important;
    border: 1px solid var(--success);
    border-radius: 15px;
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.product-section .bg-light p {
    color: var(--text-dark) !important;
    margin: 0;
    line-height: 1.5;
}

/* Why This Works section */
.card-body .border-start.border-info.bg-light {
    background: linear-gradient(135deg, var(--info-soft) 0%, var(--cream-2) 100%) !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--info) !important;
    border-radius: 15px;
    padding: 1.5rem;
}

.card-body .border-start.border-info.bg-light p {
    color: var(--text-dark) !important;
    line-height: 1.6;
}

/* Ingredient guidance styling with organic feel */
.ingredient-card {
    min-height: 84px;
    height: 84px;
    display: flex !important;
    align-items: center !important;
    padding: 14px 18px !important;
    position: relative;
    background: var(--white);
    border-radius: 18px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    border: 1px solid var(--sage-200);
}

.ingredient-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--shadow-light);
    border-color: var(--sage-400);
}

.ingredient-card.border-success {
    border: 2px solid var(--success) !important;
    background: linear-gradient(135deg, var(--success-soft) 0%, var(--white) 100%);
}

.ingredient-card.border-danger {
    border: 2px solid var(--terracotta-400) !important;
    background: linear-gradient(135deg, var(--warning-soft) 0%, var(--white) 100%);
}

.ingredient-title {
    line-height: 1.4;
    word-wrap: break-word;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-right: 30px;
    color: var(--text-dark);
    font-weight: 500;
    font-family: 'Fraunces', serif;
}

.ingredient-card .fas.fa-chevron-down {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sage-600);
}

/* Alert messages with natural styling */
.alert {
    border: 1px solid var(--sage-200);
    border-radius: 18px;
    padding: 1.2rem 1.8rem;
    margin-bottom: 1.5rem;
    font-family: 'Source Serif Pro', Georgia, serif;
}

.alert-success {
    background: var(--success-soft);
    color: var(--text-dark);
    border-left: 4px solid var(--success);
    border-color: var(--sage-200);
}

.alert-warning {
    background: var(--warning-soft);
    color: var(--text-dark);
    border-left: 4px solid var(--warning);
    border-color: var(--terracotta-400);
}

.alert-info {
    background: var(--info-soft);
    color: var(--text-dark);
    border-left: 4px solid var(--info);
    border-color: var(--sage-200);
}

/* Profile summary styling with organic feel */
.profile-summary {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border: 1px solid var(--sage-200);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.profile-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sage-600), var(--terracotta-400));
    border-radius: 24px 24px 0 0;
}

.profile-summary .col-md-2 {
    margin-bottom: 1.5rem;
}

.profile-summary small {
    color: var(--text-medium);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.profile-summary strong {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
}

/* Animations and transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .assessment-card, .routine-step-card {
    animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Icon styling */
.fas, .fab {
    transition: all 0.3s ease;
}

.card-header .fas {
    color: var(--sage-600);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .card, .assessment-card, .routine-step-card {
        animation: none !important;
    }
    
    /* Keep loading spinners functional for accessibility */
    .ring-spinner, .large-ring-spinner {
        animation-duration: 1.5s !important;
        animation-iteration-count: infinite !important;
    }
    
    .btn:hover,
    .card:hover,
    .routine-step-card:hover,
    .science-fact-card:hover,
    .ingredient-card:hover,
    .form-check:hover {
        transform: none !important;
    }
}

/* Focus improvements for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 2px solid var(--sage-600);
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .card-header, .card-body {
        padding: 1.5rem;
    }
    
    .assessment-card {
        padding: 2rem 1.5rem;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
}

/* Complete botanical utility classes */
.text-sage { color: var(--sage-600) !important; }
.text-terracotta { color: var(--terracotta-400) !important; }
.text-brown { color: var(--brown-600) !important; }
.bg-cream { background-color: var(--cream) !important; }
.bg-sage-soft { background-color: var(--sage-50) !important; }
.border-sage { border-color: var(--sage-400) !important; }
.border-terracotta { border-color: var(--terracotta-400) !important; }
.badge-terracotta {
    background: var(--terracotta-400) !important;
    color: var(--white) !important;
}

/* Botanical button variants */
.btn-outline-sage {
    color: var(--sage-600);
    border-color: var(--sage-600);
    background: transparent;
}

.btn-outline-sage:hover {
    color: var(--white);
    background: var(--sage-600);
    border-color: var(--sage-600);
}

.btn-outline-success {
    color: var(--sage-600) !important;
    border-color: var(--sage-600) !important;
    background: transparent !important;
}

.btn-outline-success:hover {
    color: var(--white) !important;
    background: var(--sage-600) !important;
    border-color: var(--sage-600) !important;
}

/* Botanical alert variants - override Bootstrap defaults */
.alert-info {
    background: var(--sage-50) !important;
    color: var(--text-dark) !important;
    border-color: var(--sage-200) !important;
    border-left: 4px solid var(--sage-400) !important;
}

.alert-success {
    background: var(--sage-50) !important;
    color: var(--text-dark) !important;
    border-color: var(--sage-200) !important;
    border-left: 4px solid var(--sage-600) !important;
}

.alert-warning {
    background: var(--warning-soft) !important;
    color: var(--text-dark) !important;
    border-color: var(--terracotta-400) !important;
    border-left: 4px solid var(--terracotta-400) !important;
}

/* Improved text contrast for accessibility */
.text-muted {
    color: var(--text-dark) !important;
    opacity: 0.8;
}

.text-dark {
    color: var(--text-dark) !important;
}

/* Organic wavy section dividers with enhanced styling */
.section-divider {
    height: 80px;
    background: var(--cream);
    position: relative;
    overflow: hidden;
    margin: 3rem 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, var(--white) 0%, var(--sage-50) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 65%, 85% 75%, 70% 65%, 50% 70%, 30% 65%, 15% 75%, 0 65%);
}

.section-divider-alt::before {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    clip-path: polygon(0 35%, 15% 25%, 30% 35%, 50% 30%, 70% 35%, 85% 25%, 100% 35%, 100% 100%, 0 100%);
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--sage-400), var(--terracotta-400));
    border-radius: 1px;
    opacity: 0.6;
}

/* Multi-Step Form Styling */
.progress-container {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--sage-200);
}

.progress-header h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.progress-bar-custom {
    position: relative;
    margin: 2rem 0;
}

.progress-line {
    height: 4px;
    background: var(--sage-200);
    border-radius: 2px;
    position: relative;
    margin: 2rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sage-600), var(--terracotta-400));
    border-radius: 2px;
    width: 12.5%; /* 1/8 steps */
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: -1rem;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sage-200);
    color: var(--text-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 3px solid var(--white);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.step-marker.active .step-number {
    background: var(--sage-600);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(111, 139, 123, 0.4);
}

.step-marker.active .step-label {
    color: var(--sage-600);
    font-weight: 600;
}

.step-marker.completed .step-number {
    background: var(--terracotta-400);
    color: var(--white);
}

.step-marker.completed .step-label {
    color: var(--terracotta-400);
}

/* Form Step Styling */
.assessment-journey-card {
    min-height: 520px !important;
    border: none;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.form-step {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s ease;
    height: 420px; /* Fixed height to enable scrolling */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Change from space-between to flex-start */
    padding-bottom: 1rem; /* Add bottom padding for spacing */
    overflow-y: auto; /* Enable vertical scrolling */
}

.form-step.active {
    opacity: 1;
    transform: translateX(0);
    display: flex;
}

.step-header {
    margin-bottom: 2rem;
}

.step-title {
    color: #000000; /* Changed to black */
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.step-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-navigation {
    padding-top: 2rem;
    border-top: 1px solid var(--sage-200);
    margin-top: auto;
}

/* Enhanced form checks for journey feel */
.form-step .form-check {
    margin-bottom: 1.2rem;
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid var(--sage-200);
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.form-step .form-check:hover {
    border-color: var(--sage-400);
    background: var(--sage-50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-light);
}

.form-step .form-check input:checked + label {
    color: var(--sage-600);
    font-weight: 600;
}

.form-step .form-check:has(input:checked) {
    border-color: var(--sage-600);
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream) 100%);
    box-shadow: 0 6px 20px rgba(111, 139, 123, 0.2);
}

/* Test result styling for interactive guides */
.test-result {
    padding: 1rem;
    background: var(--sage-50);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--sage-200);
}

.porosity-test-guide .test-result,
.density-guide .test-result,
.thickness-guide .test-result {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border: 1px solid var(--sage-200);
    transition: all 0.3s ease;
}

.porosity-test-guide .test-result:hover,
.density-guide .test-result:hover,
.thickness-guide .test-result:hover {
    background: var(--sage-200);
    transform: translateY(-2px);
}

/* Button styling for multi-step */
.btn-outline-sage {
    color: var(--sage-600);
    border-color: var(--sage-600);
    background: transparent;
    border-width: 2px;
}

.btn-outline-sage:hover {
    color: var(--white);
    background: var(--sage-600);
    border-color: var(--sage-600);
    transform: translateY(-2px);
}

/* Responsive adjustments for multi-step */
@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .step-marker {
        flex: 0 0 22%;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .progress-container {
        padding: 1.5rem;
    }
}

/* Landing Page Hero Section - Container Layout */
.home-hero {
    background: var(--cream);
    position: relative;
    height: 100svh;
    overflow: visible;
    min-height: 600px;
}

.home-hero .container-fluid,
.home-hero .row,
.home-hero .col-lg-5,
.home-hero .col-lg-7 {
    height: 100%;
    min-height: 0;
}

.home-hero .row {
    align-items: stretch !important;
    margin: 0 !important;
}

.home-hero .row.align-items-stretch {
    align-items: stretch !important;
}

.col-lg-5.d-flex {
    align-items: flex-start !important;
    padding: 2rem 0 2rem 2rem !important;
}

.col-lg-7 {
    padding: 0 !important;
}

.home-hero-content-container {
    height: 100% !important;
    display: flex;
    padding: 48px;
    border-radius: 28px;
    background: linear-gradient(160deg, #F4EFE9 0%, #F0EBE5 100%);
    box-sizing: border-box;
    overflow: hidden;
    margin: 0;
    box-shadow: 0 8px 32px rgba(107, 91, 77, 0.08);
}

.home-hero-content-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(111, 139, 123, 0.1), transparent);
}

.home-hero-content {
    margin: 0;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    overflow-wrap: anywhere;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    font-family: 'Fraunces', serif;
    word-break: keep-all;
    hyphens: none;
}

.gradient-text {
    background: linear-gradient(135deg, var(--sage-600) 0%, var(--terracotta-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 3rem;
    font-weight: 400;
    font-family: 'Source Serif Pro', Georgia, serif;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.hero-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Fraunces', serif;
}

.hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--sage-600) 0%, var(--sage-600) 100%);
    border: none;
    box-shadow: 0 6px 20px rgba(111, 139, 123, 0.3);
}

.hero-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 139, 123, 0.4);
    background: linear-gradient(135deg, var(--sage-600) 0%, var(--sage-400) 100%);
}

/* Hero Images - Three Photo Layout */
.home-hero-images {
    height: 100%;
    background: var(--cream);
    padding: 2rem 2rem 2rem 0 !important;
    display: flex;
    align-items: flex-start !important;
    justify-content: center;
    overflow: visible;
}

/* Removed conflicting rule */

.image-large {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 280px;
}

.image-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
}

.image-small {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    min-height: 140px;
}

.image-large img,
.image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
    filter: brightness(1.05) contrast(1.05);
}

.grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
    filter: brightness(1.05) contrast(1.05);
}

.image-large:hover .grid-image,
.image-small:hover .grid-image {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}

.image-large:hover,
.image-small:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}


/* Features Section */
.features-section {
    padding: 8rem 0;
    background: var(--white);
    position: relative;
}

.section-header {
    margin-bottom: 5rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream) 100%);
    border: 1px solid var(--sage-200);
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(111, 139, 123, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--sage-600) 0%, var(--terracotta-400) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 8px 24px rgba(111, 139, 123, 0.2);
}

.feature-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.feature-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1rem;
}

/* How It Works Section */
.how-it-works-section {
    padding: 8rem 0;
    background: var(--terracotta-50);
    position: relative;
}

.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--sage-200) 20%, var(--sage-300) 50%, var(--sage-200) 80%, transparent 100%);
    transform: translateY(-50%);
    z-index: 1;
}

.how-it-works-section .row {
    position: relative;
    z-index: 2;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--sage-300) 0%, var(--sage-200) 100%);
    transform: translateY(-50%);
    z-index: 1;
}

.step-item:not(:last-child)::before {
    content: '→';
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    color: var(--sage-400);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 2;
    opacity: 0.7;
}

.steps-content {
    padding: 2rem 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 2rem;
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border-radius: 24px;
    border: 1px solid rgba(111, 139, 123, 0.1);
    box-shadow: 0 8px 32px rgba(111, 139, 123, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: visible;
}

.step-item:hover {
    border: 2px solid var(--sage-400);
}

.how-it-works-section .step-number {
    font-size: 6rem !important;
    font-weight: 900 !important;
    color: rgba(111, 139, 123, 0.3) !important;
    position: absolute !important;
    top: 1.5rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1 !important;
    line-height: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    background: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.how-it-works-section .step-item:hover .step-number {
    color: rgba(111, 139, 123, 0.4) !important;
    transform: translateX(-50%) scale(1.05) !important;
}

.step-content {
    flex-grow: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: 2.5rem;
}

.step-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.step-item:hover .step-title {
    color: var(--sage-600);
}

.step-description {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.step-item:hover .step-description {
    color: var(--text-dark);
}




/* CTA Section */
.cta-section {
    padding: 8rem 0;
    background: var(--terracotta-50);
    color: var(--text-dark);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--text-dark);
}

.cta-description {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.cta-button {
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--sage-600);
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(111, 139, 123, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(111, 139, 123, 0.5);
    background: var(--sage-400);
}

.btn-xl {
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
}

/* Mission Section */
.mission-section {
    padding: 4rem 0;
    background: var(--sage-50);
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
}

.mission-title {
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.mission-text {
    text-align: center;
}

.mission-paragraph {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.mission-paragraph:last-child {
    margin-bottom: 0;
}

.mission-link {
    color: var(--sage-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mission-link:hover {
    color: var(--sage-700);
    text-decoration: underline;
}

.cta-note {
    margin-top: 2rem;
}

.cta-note small {
    opacity: 0.7;
}

/* Responsive Design for Landing Page */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .home-hero-content {
        padding: 4rem 3rem;
        margin-right: 1rem;
    }
    
    .home-image-grid {
        max-width: 420px;
    }
    
    .home-hero-images {
        padding: 3rem;
    }
    
    .image-large {
        height: 250px;
    }
    
    .image-small {
        height: 160px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .home-hero .row {
        flex-direction: column-reverse;
    }
    
    .home-hero-content-container {
        min-height: auto;
        margin: 1rem;
        border-radius: 24px;
    }
    
    .home-hero-content-container::after {
        display: none;
    }
    
    .home-hero-content {
        padding: 3rem 2rem;
        text-align: center;
        margin-right: auto;
        margin-left: auto;
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .home-hero-images {
        padding: 2rem;
        margin-bottom: 2rem;
        min-height: auto;
    }
    
    .home-image-grid {
        max-width: 350px;
    }
    
    .image-large {
        height: 200px;
    }
    
    .image-small {
        height: 130px;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* Hide connectors on mobile */
    .how-it-works-section::before {
        display: none;
    }
    
    .step-item:not(:last-child)::after,
    .step-item:not(:last-child)::before {
        display: none;
    }
    
    .step-item {
        margin-bottom: 2rem;
    }
    
    .how-it-works-section .step-number {
        font-size: 4rem !important;
        top: 1rem !important;
    }
    
    .step-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 767.98px) {
    .how-it-works-section {
        padding: 4rem 0;
    }
    
    .step-item {
        padding: 2rem 1.5rem;
    }
    
    .how-it-works-section .step-number {
        font-size: 3rem !important;
        top: 1.5rem !important;
    }
    
    .step-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .step-description {
        font-size: 0.95rem;
    }
}

/* Print styles */
@media print {
    body {
        background: var(--white);
        color: var(--text-dark);
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--sage-200);
    }
    
    .btn {
        display: none;
    }

    .section-divider {
        display: none;
    }
    
    .progress-container {
        display: none;
    }
    
    .hero-gradient,
    .floating-elements,
    .cta-section {
        display: none;
    }
}

/* Anti-overflow for small heights */
@media (max-height: 820px) {
    .hero-title {
        font-size: 2.4rem;
    }
    
    .home-hero-content {
        gap: 8px;
    }
}
/* HERO SECTION - DOUBLE PHOTO WIDTH */
.home-hero .row {
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 40% 0.1rem 59.9% !important;
    grid-template-areas: "content gap images" !important;
    height: 100% !important;
    align-items: stretch !important;
}

.home-hero .col-lg-5 {
    grid-area: content !important;
    padding: 2rem !important;
    display: flex !important;
    align-items: stretch !important;
}

.home-hero .col-lg-7 {
    grid-area: images !important;
    padding: 2rem !important;
    display: flex !important;
    align-items: stretch !important;
}

/* Removed conflicting rule */

/* Removed conflicting rule */


/* SPECIFIC HOMEPAGE HEIGHT FIX */
/* Removed conflicting rule */

/* Removed conflicting rule */


/* CACHE BUSTING AND FINAL OVERRIDE */
/* Removed conflicting rule */


/* Responsive Hero Section - DOUBLE PHOTO WIDTH */
@media (max-width: 1200px) {
    .home-hero {
        min-height: 500px;
    }
    
    .home-hero .row {
        grid-template-columns: 40% 0.1rem 59.9% !important;
    }
    
    .home-hero-content-container {
        padding: 32px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .home-hero {
        min-height: 450px;
    }
    
    .home-hero .row {
        grid-template-columns: 40% 0.1rem 59.9% !important;
    }
    
    .home-hero-content-container {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .home-hero {
        min-height: 400px;
    }
    
    .home-hero .row {
        grid-template-columns: 40% 0.1rem 59.9% !important;
    }
    
    .home-hero-content-container {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .home-hero .row {
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "content"
            "images" !important;
        gap: 1rem !important;
    }
    
    .home-hero .col-lg-5,
    .home-hero .col-lg-7 {
        padding: 1rem !important;
    }
}

/* ASSESSMENT UX IMPROVEMENTS */
.assessment-container {
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ede5 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.assessment-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.assessment-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sage-700);
    margin-bottom: 0.5rem;
}

.assessment-subtitle {
    font-size: 1.1rem;
    color: var(--sage-600);
    margin-bottom: 0;
}

.assessment-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.assessment-card-body {
    padding: 3rem;
}

.step-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.step-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--sage-700);
    margin-bottom: 1rem;
}

.step-description {
    font-size: 1.1rem;
    color: var(--sage-600);
    line-height: 1.6;
    margin-bottom: 0;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.continue-btn {
    background: linear-gradient(135deg, var(--sage-600) 0%, var(--sage-700) 100%);
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(107, 91, 77, 0.2);
    transition: all 0.3s ease;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(107, 91, 77, 0.3);
}

.back-btn {
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    color: #6c757d;
    transition: all 0.3s ease;
}

.back-btn:hover {
    border-color: var(--sage-300);
    color: var(--sage-600);
    background: rgba(107, 91, 77, 0.05);
}

.progress-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.progress-bar-custom {
    position: relative;
    margin-bottom: 1rem;
}

.progress-line {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    position: relative;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sage-500) 0%, var(--sage-600) 100%);
    border-radius: 2px;
    width: 12.5%;
    transition: width 0.3s ease;
}

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

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.step-marker.active .step-number {
    background: var(--sage-600);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 91, 77, 0.3);
}

.step-marker.completed .step-number {
    background: var(--sage-500);
    color: white;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form improvements */
.form-check-input:checked {
    background-color: var(--sage-600);
    border-color: var(--sage-600);
}

.form-check-input:focus {
    border-color: var(--sage-300);
    box-shadow: 0 0 0 0.2rem rgba(107, 91, 77, 0.25);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .assessment-card-body {
        padding: 2rem 1.5rem;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .step-description {
        font-size: 1rem;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .continue-btn, .back-btn {
        width: 100%;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}


.home-hero-content-container {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    background: linear-gradient(160deg, #F4EFE9 0%, #F0EBE5 100%) !important;
    border-radius: 28px !important;
    box-shadow: 0 8px 32px rgba(107, 91, 77, 0.08) !important;
    padding: 48px !important;
    box-sizing: border-box !important;
}

.home-hero-images {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.home-image-grid {
    width: 100% !important;
    height: 100% !important;
    display: grid !important;
    grid-template-rows: 1.2fr 1fr !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    grid-template-areas:
        "large large"
        "small1 small2" !important;
}

.image-large {
    grid-area: large !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.image-row {
    display: contents !important;
}

.image-small:first-of-type {
    grid-area: small1 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

.image-small:last-of-type {
    grid-area: small2 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

.image-large img,
.image-small img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.tab-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid #ddd;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid #ddd;
  border-bottom: none;
  background-color: #f9f9f9;
  margin-right: 5px;
}

.tab.active {
  background-color: #fff;
  border-top: 2px solid #007bff;
  border-bottom: 2px solid #fff;
}

.tab-panel {
  display: none;
  padding: 20px;
  border: 1px solid #ddd;
  border-top: none;
}

.tab-panel.active {
  display: block;
}

/* Instruction steps styling */
.instruction-steps {
  white-space: pre-line;
  line-height: 1.6;
}

.instruction-steps ol {
  margin: 0;
  padding-left: 1.5rem;
}

.instruction-steps li {
  margin-bottom: 0.5rem;
}

/* Instruction and Product Side-by-Side Layout */

/* Product Cards Styling */
.product-cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.product-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 500px; /* Increased min-height for larger images */
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--sage-400);
}

.product-image {
  width: 100%;
  height: 300px; /* Increased height further */
  overflow: hidden;
  background: white; /* Changed to white background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem; /* Increased padding */
  border-radius: 12px; /* Added rounded corners */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Added subtle shadow */
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keep contain for proper scaling */
  transition: transform 0.3s ease;
  max-width: 280px; /* Increased max dimensions */
  max-height: 280px; /* Increased max dimensions */
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.25rem;
  display: flex; /* Add flexbox for alignment */
  flex-direction: column; /* Stack items vertically */
  flex-grow: 1; /* Allow this section to grow */
}

.product-brand {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.product-description {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.product-why {
  font-size: 0.8rem;
  color: #495057;
  background: #f8f9fa;
  padding: 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--sage-400);
}

.product-why strong {
  color: var(--sage-600);
}

.shop-now-btn {
  width: 100%;
  background: var(--sage-600);
  border: none;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.shop-now-btn:hover {
  background: var(--sage-700);
  color: white;
  transform: translateY(-1px);
}

.shop-now-btn:focus {
  box-shadow: 0 0 0 3px rgba(134, 142, 150, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  
  .product-cards-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .product-image {
    height: 250px; /* Increased height for mobile too */
  }
  
.product-info {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Modern Design Updates */


.card-header {
  background: transparent !important;
  border-bottom: none !important;
  padding: 0 0 1.5rem 0 !important;
}

.card-body {
  padding: 0 !important;
}

/* Modern tab navigation */
.tab-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 3rem 0;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.tab {
  padding: 12px 24px;
  cursor: pointer;
  border-radius: 8px;
  background: transparent;
  margin: 0;
  border: none;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #6c757d;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #495057;
}

.tab.active {
  background: white;
  color: var(--sage-600);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-panel {
  display: none;
  padding: 0;
  border: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Modern section styling */
.modern-section {
  margin-bottom: 4rem;
}

.modern-section-header {
  margin-bottom: 2rem;
}

.modern-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.modern-section-subtitle {
  color: #6c757d;
  font-size: 1rem;
  margin: 0;
}

/* Modern insight cards */
.insight-item {
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
  border-radius: 20px;
  border-left: 5px solid var(--sage-400);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-light);
  position: relative;
  overflow: hidden;
}

.insight-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sage-400), var(--terracotta-400));
}

.insight-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-medium);
  border-left-color: var(--terracotta-400);
}


/* Modern routine steps */
/* Routine Steps Container */
.routine-steps-container {
  margin-top: 2rem;
}

/* Main container for each step */
.routine-step {
  background: white !important; /* This ensures a white background */
  border: 1px solid #dee2e6; /* Made border more visible */
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.routine-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.routine-step-header {
  align-items: center; /* Vertically center the whole header row */
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: row; /* This is the key: number and text are side-by-side */
  padding: 1.25rem 1.5rem;
  transition: background-color 0.2s ease;
  width: 100%;
}

.routine-step-header:hover {
  background-color: #f8f9fa;
}

.step-number {
  align-items: center;
  background: var(--sage-400);
  border-radius: 50%;
  color: white;
  display: flex;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 600;
  height: 36px;
  justify-content: center;
  margin-right: 1rem;
  width: 36px;
}

/* Wrapper for title and frequency text */
.step-info {
  align-items: center; /* Vertically center title and frequency */
  display: flex;
  flex: 1;
  flex-direction: row; /* Puts title and frequency side-by-side */
  flex-wrap: wrap; /* Allows frequency to wrap on small screens */
  gap: 1rem; /* Adds space between title and frequency */
}

/* Title of the step */
.step-info .step-title {
  color: #000000 !important; /* SET TO BLACK */
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

/* Frequency of the step */
.step-frequency {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0; /* Remove top margin */
}

/* The dropdown chevron icon */
.step-chevron {
  color: #95a5a6;
  margin-left: auto; /* Push to the right edge */
  margin-top: 0; /* Remove top margin for perfect vertical alignment */
  transition: transform 0.3s ease;
  flex-shrink: 0; /* Prevent shrinking */
  display: flex;
  align-items: center; /* Center vertically */
}

.routine-step-header[aria-expanded="true"] .step-chevron {
  transform: rotate(180deg);
  color: var(--sage-600);
}

.routine-step-content {
  background: #fdfdfd;
  border-top: 1px solid #f0f0f0;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* End of Routine Step Styles */


/* Modern ingredient guidance */
.ingredient-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.ingredient-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #e9ecef;
}

.ingredient-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.ingredient-section-title i {
  margin-right: 0.75rem;
}

.ingredient-item-modern {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.ingredient-item-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ingredient-name {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.ingredient-description {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
  .tab-list {
    flex-direction: column;
    gap: 2px;
  }
  
  .tab {
    text-align: center;
  }
  
  .ingredient-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .routine-step-header {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .step-frequency {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}


/* Results Page - Consistent with Site Design */

/* Modern tab navigation that fits the site */
.results-tabs {
  margin-bottom: 2rem;
}

.results-tab-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.results-tab {
  padding: 12px 20px;
  cursor: pointer;
  border-radius: 6px;
  background: transparent;
  margin: 0;
  border: none;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #6c757d;
  flex: 1;
  text-align: center;
}

.results-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #495057;
}

.results-tab.active {
  background: white;
  color: var(--sage-600);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-tab-panel {
  display: none;
  padding: 0;
  border: none;
}

.results-tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Results card styling - consistent with site */
.results-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.results-card-header {
  background: #f8f9fa;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.results-card-body {
  padding: 2rem;
}

/* Insight items */
.insight-item {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--sage-400);
  transition: all 0.2s ease;
}

.insight-item:hover {
  background: #f1f3f4;
  transform: translateY(-1px);
}


/* Routine styling */
.routine-intro {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--sage-400);
}




.routine-step-content {
  padding: 1.5rem;
}

.instruction-section {
  margin-bottom: 0.25rem;
}

.product-section {
  margin-bottom: 1rem;
}

.instruction-block,
.product-block {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1.25rem;
  border: 1px solid #e9ecef;
}

.product-block {
  border-left: 4px solid var(--sage-400);
}

.explanation-section {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

/* Ingredient styling */
.ingredient-card {
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
}

.ingredient-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.ingredient-description {
  padding: 0.75rem 0 0 0;
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
  .results-tab-list {
    flex-direction: column;
    gap: 2px;
  }
  
  .results-tab {
    text-align: center;
  }
  
  .routine-step-header {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .step-frequency {
    margin-top: 0;
  }
  
  .routine-step-content {
    padding-left: 0;
  }
  
  .routine-step::before {
    display: none;
  }
}


/* Additional Modern Touches */

/* Subtle animations and micro-interactions */
.results-card {
  transition: all 0.3s ease;
}


/* Modern button styling */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

/* Enhanced typography with better spacing */
.results-card-header h3 {
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* Modern progress indicators */
.step-number {
  position: relative;
  overflow: hidden;
}

.step-number::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.step-number:hover::after {
  left: 100%;
}

/* Subtle gradient overlays */
.insight-item {
  position: relative;
  overflow: hidden;
}

.insight-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sage-400), var(--terracotta-400));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.insight-item:hover::before {
  opacity: 1;
}

/* Modern focus states */
.results-tab:focus,
.ingredient-card:focus,
.btn:focus {
  outline: 2px solid var(--sage-400);
  outline-offset: 2px;
}

/* Enhanced ingredient cards */
.ingredient-card {
  position: relative;
  overflow: hidden;
}

.ingredient-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s ease;
}

.ingredient-card:hover::before {
  left: 100%;
}

/* Modern scrollbar styling */
.results-card-body::-webkit-scrollbar {
  width: 6px;
}

.results-card-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.results-card-body::-webkit-scrollbar-thumb {
  background: var(--sage-400);
  border-radius: 3px;
}

.results-card-body::-webkit-scrollbar-thumb:hover {
  background: var(--sage-600);
}

/* Loading Page Styles */
.loading-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    padding: 2rem 0;
}

.loading-card {
    background: white;
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sage-700);
    margin-bottom: 1rem;
    font-family: 'Source Serif Pro', Georgia, serif;
}

.loading-subtitle {
    font-size: 1.2rem;
    color: var(--sage-600);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.large-spinner-container {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.large-ring-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(111, 139, 123, 0.2);
    border-top: 6px solid #6F8B7B;
    border-radius: 50%;
    animation: largeRingSpin 1.5s linear infinite !important;
    display: block;
}

@keyframes largeRingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-progress-container {
    margin: 2rem 0;
}

.loading-progress {
    height: 4px;
    background: linear-gradient(90deg, var(--sage-400) 0%, var(--sage-600) 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
}

.loading-steps {
    margin: 3rem 0;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(111, 139, 123, 0.1);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.loading-step:last-child {
    border-bottom: none;
}

.loading-step.active {
    opacity: 1;
    color: var(--sage-700);
}

.loading-step.active i {
    color: var(--sage-600);
}

.loading-step i {
    font-size: 1.2rem;
    color: var(--sage-400);
    transition: color 0.3s ease;
}

.loading-step span {
    font-size: 1rem;
    font-weight: 500;
}

.loading-tip {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border-left: 4px solid var(--sage-400);
}

.loading-tip i {
    color: var(--sage-600);
    margin-right: 0.5rem;
}

.loading-tip span {
    color: var(--sage-700);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .loading-card {
        padding: 3rem 2rem;
        margin: 1rem;
    }
    
    .loading-title {
        font-size: 2rem;
    }
    
    .loading-subtitle {
        font-size: 1.1rem;
    }
    
    .large-ring-spinner {
        width: 60px;
        height: 60px;
        border-width: 4px;
    }
}

/* Subtle loading states */

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

/* Modern icon styling */
.fas {
  transition: all 0.2s ease;
}

.results-tab:hover .fas,
.ingredient-card:hover .fas {
  transform: scale(1.1);
}

/* Enhanced visual hierarchy */
.routine-intro {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Modern spacing system */
.results-card-body > * + * {
  margin-top: 1.5rem;
}

/* Subtle shadows and depth */
.instruction-block,
.product-block {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(233, 236, 239, 0.8);
}

/* Enhanced responsive design */

  
  .results-card-header {
    padding: 1rem;
  }
  
  .results-card-body {
    padding: 1rem;
  }
  
  /* Ensure routine steps maintain card styling on mobile */
  .routine-step {
    margin: 0 0 2rem 0 !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    background: white !important;
  }
  
}




/* Collapsible section headers */
.results-card-header[role="button"] {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
}

.results-card-header[role="button"]:hover {
  background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.results-card-header[role="button"] .fas.fa-chevron-down {
  transition: transform 0.3s ease;
}

.results-card-header[role="button"][aria-expanded="true"] .fas.fa-chevron-down {
  transform: rotate(180deg);
}

/* Shopping cart icon enhancement */
.fa-shopping-cart {
  animation: pulse 2s infinite;
}

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

/* ==========================================================================
   NEW RESULTS PAGE STYLES - REBUILT FROM SCRATCH
   ========================================================================== */

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--sage-200);
    display: inline-block;
}

/* Section divider for subtle separation */
.section-divider-light {
    height: 1px;
    background-color: #e9ecef;
    margin: 3rem 0;
    width: 100%;
}

/* Subtitle styling for secondary sections */
.section-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--sage-200);
    display: inline-block;
}

/* Routine Accordion Styling */
.routine-step-card {
    background: #FFFFFF;
    border: 1px solid #e9ecef;
    border-radius: 16px !important; /* Override Bootstrap */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.routine-step-card .accordion-header .accordion-button {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border-radius: 0 !important;
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

/* Ensure the content wrapper takes up available space */
.routine-step-card .accordion-header .accordion-button .d-flex {
    flex: 1;
    margin-right: 1rem;
}

.routine-step-card .accordion-header .accordion-button:not(.collapsed) {
    box-shadow: inset 0 -2px 0 var(--sage-400);
    background: #fff;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(141, 170, 157, 0.25);
}

/* Hide Bootstrap default caret and ensure custom toggle icons are properly aligned */
.accordion-button::after {
    display: none !important;
}

/* Override Bootstrap's default accordion button behavior */
.accordion-button {
    display: flex !important;
    align-items: center !important;
}

/* Ensure toggle icons are positioned correctly in all accordion buttons */
.accordion-button .toggle-icon {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Specific fix for results toggle cards */
.results-toggle-card .accordion-button .toggle-icon {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    position: relative;
    right: 0;
}

.step-number {
    background: var(--sage-400);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-frequency {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.step-frequency i {
    font-size: 0.75rem;
}

/* Instructions styling */
.instructions-container {
    margin-top: 1.5rem;
}

.instructions-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions-title i {
    color: var(--sage-600);
    font-size: 0.9rem;
}

.instructions-text {
    background: rgba(107, 91, 77, 0.05);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--sage-400);
}

.instruction-item {
    margin-bottom: 0.75rem;
    padding-left: 0;
    position: relative;
    line-height: 1.5;
    color: var(--text-dark);
    display: block;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

/* Shop now button styling */
.shop-now-btn {
    background: linear-gradient(135deg, var(--terracotta-600) 0%, var(--terracotta-700) 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.shop-now-btn:hover {
    background: linear-gradient(135deg, var(--terracotta-700) 0%, #a03d2a 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(204, 85, 51, 0.3);
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.step-frequency {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 300;
}

/* Content inside the routine accordion */
.routine-step-card .accordion-body {
    padding: 2rem;
}

.product-display {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.product-image-container {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.1);
}

.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-brand {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-reasoning {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-reasoning strong {
    font-weight: 700;
    color: var(--sage-600);
}

.instructions-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.instructions-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sage-600);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.instructions-text {
    color: #495057 !important;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Collapsible Toggles for Understanding & Ingredients */
.results-toggle-card {
    background: #FFFFFF;
    border: 1px solid #e9ecef;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.results-toggle-card .accordion-header .accordion-button {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1.5rem;
    background: #fff;
    color: var(--text-dark);
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

.results-toggle-card .accordion-header .accordion-button .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Ensure the me-auto span doesn't interfere with toggle positioning */
.results-toggle-card .accordion-header .accordion-button .me-auto {
    flex: 1 !important;
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

/* Override Bootstrap's me-auto behavior in accordion buttons */
.accordion-button .me-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.results-toggle-card .accordion-header .accordion-button:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.results-toggle-card .accordion-header .accordion-button:not(.collapsed) {
    box-shadow: inset 0 -2px 0 var(--sage-400);
}

.results-toggle-card .accordion-body {
    padding: 2rem;
}

.results-toggle-card .accordion-body .lead {
    color: #495057 !important;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Insight Cards Styling */
.insight-card {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream-2) 100%);
    border-left: 5px solid var(--sage-400);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.insight-fact {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2c3e50 !important; /* Dark color for better contrast */
}

.insight-fact strong {
    font-weight: 700;
    color: var(--terracotta-600);
}

.insight-meaning {
    font-size: 1rem;
    color: #495057 !important; /* Dark color for better contrast */
}

.insight-meaning strong {
    font-weight: 700;
    color: var(--sage-600);
}

/* Ingredient Columns Styling */
.ingredient-column {
    background: transparent;
    border: none;
    padding: 0;
    height: 100%;
}

.ingredient-column-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.ingredient-column.beneficial .ingredient-column-title {
    color: var(--sage-600);
}

.ingredient-column.to-avoid .ingredient-column-title {
    color: var(--terracotta-600);
}

.ingredient-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.ingredient-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ingredient-name {
    font-weight: 700;
}

.ingredient-benefit, .ingredient-reason {
    font-size: 0.9rem;
    color: #495057;
    margin-top: 0.25rem;
}

@media (max-width: 991.98px) {
    .product-display {
        flex-direction: column;
    }
    .product-image-container {
        width: 100%;
        height: 250px;
        margin-bottom: 1.5rem;
        padding: 0;
    }
}

/* New Ingredient Toggle Card Styling */
.ingredient-toggle-card {
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: transparent;
    transition: all 0.2s ease-in-out;
    min-height: 60px;
    display: flex;
    flex-direction: column;
}

.ingredient-toggle-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.ingredient-toggle-header {
    height: 60px;
    display: flex;
    align-items: center;
}

.ingredient-column.beneficial .ingredient-toggle-card {
    background: transparent;
    border: 1px solid var(--sage-400);
}

.ingredient-column.to-avoid .ingredient-toggle-card {
    background: transparent;
    border: 1px solid var(--terracotta-400);
}

/* Ingredient toggle button styling with proper alignment */
.ingredient-toggle-button {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    font-weight: 500;
    color: #495057;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative;
}

.ingredient-toggle-button .toggle-icon {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: transform 0.3s ease;
}

.ingredient-toggle-button:not(.collapsed) .toggle-icon {
    transform: translateY(-50%) rotate(180deg) !important;
}

.ingredient-toggle-button .ingredient-title {
    flex: 1 !important;
    margin-right: 2rem !important;
    padding-right: 1rem !important;
    text-align: left !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important; /* Allow wrapping on mobile */
}

.ingredient-column.beneficial .ingredient-toggle-button .ingredient-title {
    color: var(--sage-400) !important;
}

.ingredient-column.to-avoid .ingredient-toggle-button .ingredient-title {
    color: var(--terracotta-400) !important;
}

.ingredient-toggle-button:focus {
    outline: none;
    box-shadow: none;
}

.ingredient-toggle-body {
    padding: 0 1.25rem 1rem 1.25rem;
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 1rem;
}

.toggle-icon {
    transition: transform 0.3s ease;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    display: flex;
    align-items: center;
}

.ingredient-toggle-button:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}


@media (max-width: 991.98px) {
    .product-display {
        flex-direction: column;
    }
    .product-image-container {
        width: 100%;
        height: 250px;
        margin-bottom: 1.5rem;
        padding: 0;
    }
}


/* Helper Toggle Button Styling */
.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: var(--sage-600);
    font-weight: 500;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.toggle-btn i:first-child {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.toggle-btn span {
    flex: 1;
    text-align: center;
}

.toggle-btn .toggle-icon {
    margin-left: 0.5rem;
    flex-shrink: 0;
}


/* Hair Type Guide Styling */
.hair-guide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.hair-guide-header h1 {
    font-size: 2.5rem;
    color: var(--sage-600);
    margin-bottom: 1rem;
}

.guide-intro {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.hair-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 4rem;
}

.hair-type-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--cream);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hair-type-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hair-type-img {
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}

.hair-type-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sage-600);
    margin: 0 0 0.5rem 0;
}

.hair-type-source {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .hair-types-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .hair-type-container {
        padding: 1rem;
    }
    
    .hair-type-img {
        width: 250px;
        height: 350px;
    }
    
    .hair-guide-header h1 {
        font-size: 2rem;
    }
    
    .guide-intro {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Option card styles moved to quiz_styles.css to avoid conflicts */

.option-title {
    font-weight: 600;
    color: var(--sage-600);
    margin-bottom: 0.25rem;
}

.option-desc {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Option card state styles moved to quiz_styles.css to avoid conflicts */


/* Quiz Navigation Styling */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: transparent;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    padding-left: 0; /* Use parent card padding */
    padding-right: 0;
    padding-bottom: 0;
    width: 100%; /* Ensure full width within container */
    box-sizing: border-box; /* Include padding in width calculation */
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.back-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.next-btn, .submit-btn {
    background: var(--sage-600);
    color: white;
    border: 1px solid var(--sage-600);
}

.next-btn:hover, .submit-btn:hover {
    background: var(--sage-700);
    transform: translateY(-1px);
}

/* When back button is hidden (step 1), align continue button to the right */
.quiz-navigation:has(.back-btn[style*="display: none"]) {
    justify-content: flex-end;
}

/* Alternative approach for browsers that don't support :has() */
.quiz-navigation.back-hidden {
    justify-content: flex-end;
}


/* Guide Option Styling */
.guide-option-content strong {
    white-space: nowrap;
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
}

.guide-option-content small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6c757d;
}


/* Unified warm, creamy filter for all hero images */
.bw-filter,
.image-small .grid-image {
    filter: sepia(0.25) saturate(0.85) brightness(1.08) contrast(0.92) hue-rotate(-12deg) !important;
    transition: filter 0.3s ease;
}

.bw-filter:hover,
.image-small:hover .grid-image {
    filter: sepia(0.3) saturate(0.9) brightness(1.1) contrast(0.95) hue-rotate(-10deg) !important;
}

/* Image positioning and zoom for hero images */
.bw-filter {
    object-position: center 15%;
    transform: scale(1.1);
}

/* Bottom small images positioning */
.image-small:first-child .grid-image {
    object-position: center 40%;
}

.image-small:last-child .grid-image {
    object-position: center 15%;
}

/* ========================================
   COMPLETELY NEW HERO DESIGNS
   ======================================== */

/* Minimal Header */
.minimal-header {
    background: var(--sage-700); /* Darker green background */
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
}

.minimal-header .brand-logo h4 {
    font-weight: 600;
    color: white !important; /* White text for contrast against dark green */
}

.minimal-nav .btn-outline-primary {
    border-color: white;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.2;
}

.minimal-nav .btn-outline-primary:hover {
    background-color: white;
    border-color: white;
    color: var(--sage-700);
}

/* Hero Variation 1: Minimalist Single Column */
.hero-minimalist {
    height: 100vh;
    display: flex;
    align-items: center;
    background: var(--sage-50);
    padding: 4rem 0 2rem 0; /* More top padding for better spacing */
    box-sizing: border-box;
}

.hero-content-minimal {
    text-align: center;
    margin-bottom: 2rem;
}


.hero-title-minimal {
    font-size: 4rem;
    font-weight: 300;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text-minimal {
    background: linear-gradient(90deg, var(--sage-600), var(--terracotta-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
}

.hero-subtitle-minimal {
    font-size: 1.2rem; /* Slightly bigger subtitle text */
    color: var(--text-medium);
    margin-bottom: 2rem; /* Equal spacing above button */
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-minimal-primary {
    background: var(--sage-600);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(111, 139, 123, 0.3);
}

.btn-minimal-primary:hover {
    background: var(--sage-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(111, 139, 123, 0.4);
}

.hero-time-minimal {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem; /* Reduced vertical space */
}

.hero-images-minimal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.hero-image-outer-left,
.hero-image-outer-right {
    flex: 0 0 200px;
}

.hero-image-left,
.hero-image-right {
    flex: 0 0 250px;
}

.hero-image-center {
    flex: 0 0 450px;
}

.hero-main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-main-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.hero-side-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-side-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for five-image layout */
@media (max-width: 1200px) {
    .hero-image-outer-left,
    .hero-image-outer-right {
        flex: 0 0 180px;
    }
    
    .hero-image-left,
    .hero-image-right {
        flex: 0 0 220px;
    }
    
    .hero-image-center {
        flex: 0 0 400px;
    }
}

@media (max-width: 992px) {
    .hero-image-outer-left,
    .hero-image-outer-right {
        flex: 0 0 150px;
    }
    
    .hero-image-left,
    .hero-image-right {
        flex: 0 0 200px;
    }
    
    .hero-image-center {
        flex: 0 0 350px;
    }
}

@media (max-width: 768px) {
    /* This rule is now handled in the main mobile section above */
}

/* Hero Variation 2: Split Screen with Large Typography */
.hero-split-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #1a1a1a;
    color: white;
}

.hero-left-panel {
    padding: 4rem;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
}

.hero-content-split {
    max-width: 500px;
}

.hero-number-large {
    font-size: 8rem;
    font-weight: 900;
    color: #6c757d;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.hero-title-split {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 2rem;
    color: white;
}

.hero-title-accent {
    color: #ff6b6b;
    font-weight: 900;
}

.hero-description-split {
    margin-bottom: 3rem;
}

.hero-description-split p {
    font-size: 1.3rem;
    color: #b0b0b0;
    line-height: 1.6;
}

.hero-stats-split {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-split {
    text-align: center;
}

.stat-number-split {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: #ff6b6b;
    line-height: 1;
}

.stat-label-split {
    font-size: 0.9rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-split-primary {
    background: #ff6b6b;
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 0;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid #ff6b6b;
}

.btn-split-primary:hover {
    background: transparent;
    color: #ff6b6b;
    transform: translateX(10px);
}

.hero-right-panel {
    background: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-split-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Hero Variation 3: Card-Based Layout */
.hero-card-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    color: white;
}

.hero-cards-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    min-height: 500px;
}

.hero-main-card {
    grid-row: 1 / 3;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-content-main {
    width: 100%;
}

.hero-title-card {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description-card {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.btn-card-primary {
    background: white;
    color: #667eea;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-card-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.btn-card-primary:hover .btn-icon {
    transform: translateX(5px);
}

.hero-benefit-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-benefit-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.hero-image-section {
    text-align: center;
}

.hero-card-image {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-minimalist {
        min-height: 100vh; /* Use min-height instead of height for mobile */
        height: auto; /* Allow content to determine height */
        padding: 2rem 0; /* Reduced padding for mobile */
        display: flex; /* Keep flex for proper centering */
        align-items: center; /* Center content vertically */
    }
    
    .hero-content-minimal {
        padding: 1rem 0; /* Reduced padding */
        text-align: center; /* Ensure text is centered */
    }
    
    .hero-title-minimal {
        font-size: 2.2rem; /* Smaller but still readable */
        margin-bottom: 1.5rem;
        line-height: 1.2; /* Better line height for mobile */
    }
    
    .hero-subtitle-minimal {
        font-size: 1.1rem; /* Slightly smaller for mobile */
        margin-bottom: 2rem;
        padding: 0 1rem; /* Add horizontal padding */
    }
    
    .hero-images-minimal {
        margin-top: 2rem; /* Add space between content and images */
        flex-direction: column; /* Stack images vertically */
        gap: 1rem; /* Space between images */
        align-items: center; /* Center images */
    }
    
    .hero-image-outer-left,
    .hero-image-left,
    .hero-image-center,
    .hero-image-right,
    .hero-image-outer-right {
        flex: none;
        width: 100%;
        max-width: 280px; /* Consistent width */
    }
    
    .hero-main-image,
    .hero-side-image {
        height: 200px; /* Consistent height */
        object-fit: cover;
        border-radius: 12px;
    }
    
    /* Mobile header adjustments */
    .minimal-header {
        padding: 0.75rem 0; /* Increase header padding slightly */
    }
    
    .minimal-header .container .d-flex {
        padding-top: 0 !important; /* Remove top padding */
        padding-bottom: 0 !important; /* Remove bottom padding */
    }
    
    .minimal-header .brand-logo h4 {
        font-size: 1.3rem; /* Larger logo on mobile */
        margin-bottom: 0; /* Remove any bottom margin */
    }
    
    .minimal-nav .btn-outline-primary {
        padding: 0.4rem 1rem; /* Adjusted padding to match logo height */
        font-size: 0.9rem;
        margin-bottom: 0; /* Remove bottom margin */
        line-height: 1.2; /* Better line height */
        display: flex; /* Use flexbox for better alignment */
        align-items: center; /* Center content vertically */
        justify-content: center; /* Center content horizontally */
        height: auto; /* Let content determine height */
        min-height: 1.6rem; /* Match logo visual height */
    }
    
    .minimal-nav .btn-outline-primary i {
        margin-right: 0.25rem; /* Smaller margin for mobile */
        vertical-align: middle; /* Ensure icon is centered */
    }
    
    /* Quiz mobile adjustments */
    .quiz-card {
        min-height: 520px; /* Consistent height for scrolling */
        padding: 1.5rem; /* Standard mobile padding */
    }
    
    .quiz-navigation {
        flex-direction: column !important; /* Stack buttons vertically on mobile */
        gap: 1rem !important; /* Space between buttons */
        margin-top: 1rem !important; /* Reduced margin */
        padding-top: 1rem !important; /* Reduced padding */
        padding-bottom: 1rem !important; /* Reduced padding */
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0 !important; /* Use parent card padding */
        padding-right: 0 !important;
        align-items: stretch !important; /* Ensure buttons stretch to full width */
    }
    
    .quiz-navigation .nav-btn {
        width: 100% !important; /* Full width buttons on mobile */
        padding: 0.75rem 1rem !important; /* Consistent padding */
        font-size: 1rem !important; /* Readable font size */
        margin-bottom: 0 !important; /* Remove any margin that might cause overlap */
    }
    
    .form-step {
        height: 420px; /* Consistent height for scrolling on mobile */
        padding-bottom: 1rem; /* Reduce bottom padding to minimize white space */
    }
    
    .hero-split-screen {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
}

/* Extra small screens (480px and below) */
@media (max-width: 480px) {
    .hero-title-minimal {
        font-size: 2rem; /* Even smaller on very small screens */
    }
    
    .hero-subtitle-minimal {
        font-size: 1rem;
    }
    
    .minimal-header .brand-logo h4 {
        font-size: 1.2rem; /* Slightly smaller on very small screens but still proportional */
    }
    
    .minimal-nav .btn-outline-primary {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .quiz-card {
        padding: 1rem; /* Standard small mobile padding */
    }
    
    .quiz-navigation {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0 !important; /* Use parent card padding */
        padding-right: 0 !important;
        padding-top: 0.75rem; /* Even smaller padding */
        padding-bottom: 0.75rem;
    }
    
    .quiz-navigation .nav-btn {
        padding: 0.6rem 0.8rem !important; /* Smaller padding for very small screens */
        font-size: 0.9rem !important;
        margin-bottom: 0 !important; /* Ensure no margin overlap */
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix any remaining nowrap issues */
    .guide-option-content strong {
        white-space: normal; /* Allow wrapping */
    }
    
    /* Contact form mobile adjustments */
    .card-body {
        padding: 1rem;
    }
    
    /* Results page mobile adjustments */
    .results-header {
        padding: 1.5rem 1rem;
    }
    
    .results-main-title {
        font-size: 1.8rem;
    }
    
    /* Ensure all buttons are touch-friendly */
    .btn {
        min-height: 44px; /* iOS touch target size */
        min-width: 44px;
    }
    
    .hero-left-panel {
        padding: 2rem;
    }
    
    .hero-number-large {
        font-size: 4rem;
    }
    
    .hero-title-split {
        font-size: 2.5rem;
    }
    
    .hero-cards-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
    }
    
    .hero-main-card {
        grid-row: auto;
        padding: 2rem;
    }
    
    .hero-title-card {
        font-size: 2.5rem;
    }
}

/* Hero Variation 4: Multi-Image Showcase (Clean, No Overlap) */
.hero-multi-image-clean {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
}

.hero-text-section-clean {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-content-clean {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title-clean {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-accent-clean {
    color: #e74c3c;
    font-weight: 800;
}

.hero-description-clean {
    font-size: 1.3rem;
    color: #6c757d;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-features-clean {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.feature-item-clean {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #2c3e50;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon-clean {
    width: 24px;
    height: 24px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-clean-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.btn-clean-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.4);
}

.btn-arrow-clean {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.btn-clean-primary:hover .btn-arrow-clean {
    transform: translateX(5px);
}

.hero-gallery-section-clean {
    margin-top: 2rem;
}

.gallery-header-clean {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title-clean {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.gallery-subtitle-clean {
    font-size: 1.2rem;
    color: #6c757d;
}

.gallery-grid-clean {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-item-clean {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item-clean:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-main-clean {
    grid-row: 1 / 3;
}

.gallery-medium-clean {
    grid-row: 1 / 2;
}

.gallery-small-clean {
    grid-row: 2 / 3;
}

.gallery-image-clean {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item-clean:hover .gallery-image-clean {
    transform: scale(1.05);
}

.gallery-overlay-clean {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1.5rem 1.5rem;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item-clean:hover .gallery-overlay-clean {
    opacity: 1;
}

.gallery-label-clean {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stats-section-clean {
    display: flex;
    justify-content: center;
    gap: 4rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.stat-item-clean {
    text-align: center;
}

.stat-number-clean {
    font-size: 2.5rem;
    font-weight: 800;
    color: #e74c3c;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label-clean {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive Design for Clean Multi-Image */
@media (max-width: 768px) {
    .hero-title-clean {
        font-size: 2.5rem;
    }
    
    .hero-features-clean {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .gallery-grid-clean {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 250px);
        gap: 1rem;
    }
    
    .gallery-main-clean,
    .gallery-medium-clean,
    .gallery-small-clean {
        grid-row: auto;
    }
    
    .stats-section-clean {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
    }
}

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

.footer-branded {
    background: linear-gradient(135deg, var(--sage-100) 0%, var(--sage-200) 100%);
}

.footer-branded .text-muted {
    color: var(--sage-600) !important;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Privacy Policy and Terms of Service Page Styling */
.privacy-terms-page .card-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.privacy-terms-page .card-body p {
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    font-weight: 400;
}

.privacy-terms-page .card-body h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.privacy-terms-page .card-body ul {
    margin-bottom: 1.2rem;
}

.privacy-terms-page .card-body li {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.privacy-terms-page .card-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

.privacy-terms-page .card-body a {
    color: var(--sage-600);
    text-decoration: none;
    font-weight: 500;
}

.privacy-terms-page .card-body a:hover {
    color: var(--sage-400);
    text-decoration: underline;
}

.footer-branded i {
    color: var(--sage-500);
}

/* ========================================
   EXCLUSIVE OPTION STYLING
   ======================================== */

.exclusive-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    position: relative;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    text-align: center !important;
}

.full-width {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

.exclusive-option .option-title {
    color: #495057 !important;
    font-weight: 600 !important;
}

.exclusive-option .option-desc {
    color: #6c757d !important;
}

.exclusive-option:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
    border-color: var(--sage-400) !important;
}

.exclusive-option .option-input:checked + .option-label {
    border-color: var(--sage-600) !important;
    box-shadow: 0 4px 16px rgba(111, 139, 123, 0.2) !important;
    outline: none !important;
}

/* Exclusive option styles moved to quiz_styles.css to avoid conflicts */

.exclusive-option .option-input:checked {
    outline: none !important;
    box-shadow: none !important;
}

.exclusive-option:has(.option-input:checked) {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--sage-100) 100%) !important;
    border-color: var(--sage-600) !important;
}

.exclusive-option .option-input:focus + .option-label {
    outline: 2px solid var(--sage-400) !important;
    outline-offset: 2px !important;
}

.exclusive-option .option-input:checked + .option-label .option-title {
    color: var(--sage-700) !important;
    font-weight: 700 !important;
}

.exclusive-option .option-input:checked + .option-label .option-desc {
    color: var(--sage-600) !important;
}

/* Sharing Section Styles */
.sharing-container {
    background: linear-gradient(135deg, #F0F4F1 0%, #E8F0EB 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(122, 154, 138, 0.2);
    box-shadow: 0 4px 20px rgba(107, 91, 77, 0.08);
}

.sharing-title {
    color: var(--sage-700);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.sharing-title i {
    color: var(--sage-600);
}

.sharing-description {
    color: var(--sage-600);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.sharing-note {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0.75rem 1rem;
    background: rgba(107, 91, 77, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--sage-400);
}

.sharing-note small {
    color: var(--sage-600);
    font-size: 0.85rem;
    line-height: 1.4;
}

.share-button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 12px;
    background: white;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    min-width: 100px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.share-btn i {
    font-size: 1.5rem;
}

.whatsapp-btn:hover {
    border-color: #25D366;
    color: #25D366;
}

.instagram-btn:hover {
    border-color: #E4405F;
    color: #E4405F;
}

.twitter-btn:hover {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.facebook-btn:hover {
    border-color: #1877F2;
    color: #1877F2;
}

.link-copy-section, .share-message-section {
    margin-bottom: 2rem;
}

.link-copy-section h4, .share-message-section h4 {
    color: var(--sage-700);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.link-copy-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--sage-200);
    border-radius: 8px;
    background: white;
    color: var(--sage-700);
    font-size: 0.9rem;
}

.link-input:focus {
    outline: none;
    border-color: var(--sage-500);
    box-shadow: 0 0 0 3px rgba(122, 154, 138, 0.1);
}

.copy-btn, .copy-message-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--sage-500) 0%, var(--sage-600) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover, .copy-message-btn:hover {
    background: linear-gradient(135deg, var(--sage-600) 0%, var(--sage-700) 100%);
    transform: translateY(-1px);
}

.share-message-text {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--sage-200);
    border-radius: 8px;
    background: white;
    color: var(--sage-700);
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 1rem;
}

.share-message-text:focus {
    outline: none;
    border-color: var(--sage-500);
    box-shadow: 0 0 0 3px rgba(122, 154, 138, 0.1);
}

.copy-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sage-600);
    font-weight: 500;
    justify-content: center;
    padding: 0.75rem;
    background: rgba(122, 154, 138, 0.1);
    border-radius: 8px;
    border: 1px solid var(--sage-200);
}

.copy-success i {
    color: var(--sage-500);
}

/* Mobile Responsiveness for Sharing */
@media (max-width: 768px) {
    .sharing-container {
        padding: 1.5rem;
    }
    
    .share-button-group {
        gap: 0.75rem;
    }
    
    .share-btn {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }
    
    .share-btn i {
        font-size: 1.25rem;
    }
    
    .link-copy-container {
        flex-direction: column;
    }
    
    .copy-btn, .copy-message-btn {
        justify-content: center;
    }
}

/* Instruction Items Styling - Consolidated with main styling above */

/* Results Page Header Styling */
.results-header {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(107, 91, 77, 0.1);
}

.results-title-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sage-800);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.results-subtitle {
    font-size: 1.2rem;
    color: var(--sage-700);
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Responsive adjustments for results title */
@media (max-width: 768px) {
    .results-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .results-main-title {
        font-size: 2rem;
    }
    
    .results-subtitle {
        font-size: 1.1rem;
    }
}

/* Mobile-specific fixes for results pages */
@media (max-width: 768px) {
    /* Global mobile fixes */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix container overflow - override Bootstrap defaults */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Ensure all Bootstrap containers respect viewport */
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden;
    }
    
    /* Fix results title container */
    .results-title-container {
        padding: 0 1rem;
    }
    
    .results-main-title {
        font-size: 1.8rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
    }
    
    .results-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        white-space: normal;
    }
    
    /* Fix section titles */
    .section-title {
        font-size: 1.5rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    /* Fix accordion buttons */
    .accordion-button {
        padding: 1rem !important;
        font-size: 1rem !important;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        flex-wrap: wrap;
    }
    
    /* Fix step titles */
    .step-title {
        font-size: 0.95rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    /* Fix step info layout */
    .step-info {
        min-width: 0;
        flex: 1;
    }
    
    /* Fix product display */
    .product-display {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-image-container {
        width: 100% !important;
        height: 200px;
        margin-bottom: 1rem;
        flex-shrink: 1;
        max-width: 100%;
    }
    
    .product-details {
        width: 100%;
        min-width: 0;
    }
    
    .product-name {
        font-size: 1.1rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    .product-brand {
        font-size: 0.9rem;
        white-space: normal;
    }
    
    .product-reasoning {
        font-size: 0.9rem;
        line-height: 1.4;
        white-space: normal;
    }
    
    /* Fix accordion body padding */
    .accordion-body {
        padding: 1rem !important;
    }
    
    /* Fix sharing section */
    .sharing-container {
        padding: 1rem;
    }
    
    .sharing-title {
        font-size: 1.3rem;
        line-height: 1.3;
        white-space: normal;
    }
    
    .sharing-description {
        font-size: 0.95rem;
        line-height: 1.4;
        white-space: normal;
    }
    
    .share-button-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .share-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        min-width: auto;
        white-space: normal;
    }
    
    .link-copy-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .link-input {
        width: 100%;
        font-size: 0.9rem;
    }
    
    .copy-btn {
        width: 100%;
        padding: 0.75rem;
        white-space: normal;
    }
    
    /* Fix guide options */
    .guide-option-content strong {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix step numbers */
    .step-number {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    /* Fix toggle icons */
    .toggle-icon {
        flex-shrink: 0;
        min-width: 20px;
    }
}

/* iPhone-specific fixes */
@media (max-width: 414px) {
    /* iPhone Plus and smaller */
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .results-main-title {
        font-size: 1.4rem !important;
        padding: 0 0.25rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .results-subtitle {
        font-size: 0.9rem !important;
        padding: 0 0.25rem !important;
        white-space: normal !important;
    }
    
    .section-title {
        font-size: 1.2rem !important;
        padding: 0 0.25rem !important;
        white-space: normal !important;
    }
    
    .accordion-button {
        padding: 0.5rem !important;
        font-size: 0.85rem !important;
        white-space: normal !important;
    }
    
    .step-title {
        font-size: 0.8rem !important;
        white-space: normal !important;
    }
    
    .product-image-container {
        height: 160px !important;
        width: 100% !important;
    }
    
    .product-name {
        font-size: 0.9rem !important;
        white-space: normal !important;
    }
    
    .accordion-body {
        padding: 0.5rem !important;
    }
    
    .sharing-container {
        padding: 0.5rem !important;
    }
    
    .sharing-title {
        font-size: 1.1rem !important;
        white-space: normal !important;
    }
    
    .step-number {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.7rem !important;
    }
    
    .share-btn {
        min-width: auto !important;
        white-space: normal !important;
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 375px) {
    /* iPhone SE and smaller */
    .container {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    .container-fluid {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    .results-main-title {
        font-size: 1.2rem !important;
        padding: 0 !important;
    }
    
    .results-subtitle {
        font-size: 0.85rem !important;
        padding: 0 !important;
    }
    
    .section-title {
        font-size: 1.1rem !important;
        padding: 0 !important;
    }
    
    .accordion-button {
        padding: 0.4rem !important;
        font-size: 0.8rem !important;
    }
    
    .step-title {
        font-size: 0.75rem !important;
    }
    
    .product-image-container {
        height: 140px !important;
    }
    
    .product-name {
        font-size: 0.85rem !important;
    }
    
    .accordion-body {
        padding: 0.4rem !important;
    }
    
    .sharing-container {
        padding: 0.4rem !important;
    }
    
    .sharing-title {
        font-size: 1rem !important;
    }
    
    .step-number {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.6rem !important;
    }
    
    .share-btn {
        padding: 0.4rem !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .results-main-title {
        font-size: 1.6rem;
        padding: 0 0.5rem;
        white-space: normal;
    }
    
    .results-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        white-space: normal;
    }
    
    .section-title {
        font-size: 1.3rem;
        padding: 0 0.5rem;
        white-space: normal;
    }
    
    .accordion-button {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
        white-space: normal;
    }
    
    .step-title {
        font-size: 0.85rem;
        white-space: normal;
    }
    
    .product-image-container {
        height: 180px;
        width: 100% !important;
    }
    
    .product-name {
        font-size: 1rem;
        white-space: normal;
    }
    
    .accordion-body {
        padding: 0.75rem !important;
    }
    
    .sharing-container {
        padding: 0.75rem;
    }
    
    .sharing-title {
        font-size: 1.2rem;
        white-space: normal;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .share-btn {
        min-width: auto;
        white-space: normal;
    }
}

/* Footer links styling */
.footer-links a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007bff !important;
}

/* Sharing Section Styling */
.sharing-container {
    background: linear-gradient(135deg, var(--sage-50) 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(107, 91, 77, 0.1);
    text-align: center;
}

.sharing-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sage-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.sharing-description {
    font-size: 1.1rem;
    color: var(--sage-700);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.sharing-options {
    max-width: 600px;
    margin: 0 auto;
}

.share-button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    background: #20b358;
    color: white;
    transform: translateY(-2px);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.instagram-btn:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-2px);
}

.twitter-btn {
    background: #1DA1F2;
    color: white;
}

.twitter-btn:hover {
    background: #0d8bd9;
    color: white;
    transform: translateY(-2px);
}

.facebook-btn {
    background: #1877F2;
    color: white;
}

.facebook-btn:hover {
    background: #166fe5;
    color: white;
    transform: translateY(-2px);
}

.link-copy-section h4 {
    font-size: 1.1rem;
    color: var(--sage-700);
    margin-bottom: 1rem;
}

.link-copy-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
}

.link-input:focus {
    outline: none;
    border-color: var(--sage-500);
    box-shadow: 0 0 0 3px rgba(107, 91, 77, 0.1);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--sage-600);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--sage-700);
    transform: translateY(-1px);
}

.copy-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 1rem;
}

.copy-success i {
    color: #28a745;
}

/* Science Page Styling */
.science-header {
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream) 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 2rem;
}

.science-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.science-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.science-subtitle {
    font-size: 1.5rem;
    color: var(--sage-600);
    font-weight: 500;
    margin-bottom: 2rem;
    font-style: italic;
}

.science-intro {
    margin-top: 2rem;
}

.science-intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.ingredient-engine-section {
    padding: 3rem 0;
    background: var(--white);
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

.scientific-factors-section {
    padding: 3rem 0;
    background: var(--cream-2);
}

.factors-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
}

.factors-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    padding: 1rem;
}

.scientific-factors-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.scientific-factors-table th {
    background: var(--sage-50);
    color: var(--text-dark);
    font-weight: 600;
    padding: 1.5rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--sage-200);
    font-family: 'Fraunces', serif;
}

.scientific-factors-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--sage-200);
    vertical-align: top;
    line-height: 1.6;
}

.scientific-factors-table tr:hover {
    background: var(--sage-50);
}

.factor-name {
    font-weight: 600;
    color: var(--text-dark);
    width: 30%;
    min-width: 150px;
}

.factor-rationale {
    color: var(--text-medium);
    width: 70%;
}

.routine-building-section {
    padding: 3rem 0;
    background: var(--white);
}

.routine-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    text-align: center;
}

.routine-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.routine-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--cream);
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.routine-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow-medium);
}

.step-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--sage-600);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.step-description {
    color: var(--text-medium);
    line-height: 1.6;
}

.science-result-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream) 100%);
}

.result-content {
    max-width: 700px;
    margin: 0 auto;
}

.result-title {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.result-description {
    font-size: 1.2rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.result-mission {
    font-size: 1.1rem;
    color: var(--sage-600);
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.science-cta {
    margin-top: 2rem;
}

.science-cta .btn {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Responsive Design for Science Page */
@media (max-width: 768px) {
    .science-title {
        font-size: 2.5rem;
    }
    
    .science-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .factors-title {
        font-size: 1.5rem;
    }
    
    .routine-title {
        font-size: 1.5rem;
    }
    
    .result-title {
        font-size: 1.8rem;
    }
    
    .routine-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .routine-step {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .step-icon {
        margin: 0 auto 1rem;
    }
    
    .scientific-factors-table {
        font-size: 0.85rem;
    }
    
    .scientific-factors-table th,
    .scientific-factors-table td {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .science-header {
        padding: 2rem 0;
    }
    
    .science-title {
        font-size: 2rem;
    }
    
    .science-subtitle {
        font-size: 1rem;
    }
    
    .science-intro-text {
        font-size: 1rem;
    }
    
    .factors-table-container {
        padding: 0.5rem;
    }
    
    .scientific-factors-table th,
    .scientific-factors-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Privacy and Terms pages styling */
.privacy-terms-page h3 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.privacy-terms-page h3:first-of-type {
    margin-top: 0;
}

.privacy-terms-page ul {
    margin-bottom: 1.5rem;
}

.privacy-terms-page li {
    margin-bottom: 0.5rem;
}

.privacy-terms-page .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
}

.privacy-terms-page .card-body {
    padding: 2rem;
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .quiz-card {
        padding: 0.75rem; /* Standard very small screen padding */
        min-height: 520px; /* Consistent height for scrolling */
    }
    
    .quiz-navigation {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        margin-top: 0.75rem;
    }
    
    .quiz-navigation .nav-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
        min-height: 40px; /* Ensure buttons are touch-friendly */
    }
    
    .form-step {
        height: 420px; /* Consistent height for scrolling on small screens */
        padding-bottom: 0.5rem; /* Reduce padding to save space */
    }
    
    .question-title {
        font-size: 1.5rem !important; /* Smaller title to save space */
    }
    
    .question-description {
        font-size: 0.9rem !important; /* Smaller description */
    }
}
