/* ==========================================================================
   DESIGN SYSTEM & VARIABLES - 4C INNOVATION (LIGHT THEME)
   ========================================================================== */
:root {
    /* Brand Colors */
    --color-brand-navy: #1B2A41;     /* Primary site navy */
    --color-brand-blue: #004AAD;     /* Brand blue */
    --color-accent-green: #4DDE61;   /* Main CTA accent (lime/green) */
    
    /* Page & Card Backgrounds */
    --color-bg-page: #f4f6fa;        /* Light soft gray/blue background */
    --color-bg-card: #ffffff;        /* Crisp white container */
    
    /* Diagnostics Colors */
    --color-success-bg: #d1fae5;     /* Soft green */
    --color-success-text: #065f46;   /* Dark forest green */
    --color-success-border: #a7f3d0;
    
    --color-warning-bg: #fef3c7;     /* Soft yellow */
    --color-warning-text: #92400e;   /* Dark orange/brown */
    --color-warning-border: #fde68a;
    
    --color-danger-bg: #fee2e2;      /* Soft red */
    --color-danger-text: #991b1b;     /* Dark red */
    --color-danger-border: #fecaca;
    
    /* Neutral Palette */
    --color-text-main: #272727;      /* Dark charcoal for high contrast */
    --color-text-muted: #64748b;     /* Medium slate gray */
    --color-border-light: #e2e8f0;   /* Light gray lines */
    --color-border-focus: #004AAD;   /* Focus state blue */
    
    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Rounded corners matching Elementor styles */
    --border-radius-sm: 5px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-page);
    color: var(--color-text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   APP WRAPPER LAYOUT
   ========================================================================== */
.app-container {
    width: 100%;
    max-width: 480px; /* Perfect for mobile, looks neat on desktop */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ==========================================================================
   HEADER STYLE (MATCHES SITE NAVBAR)
   ========================================================================== */
.app-header {
    background-color: #000000;
    padding: 18px;
    text-align: center;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.brand-logo {
    height: 45px;
    max-width: 90%;
    object-fit: contain;
}

/* ==========================================================================
   MAIN DIAGNOSTIC CARD
   ========================================================================== */
.diagnostic-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-top: none; /* Merges visually with the header */
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.progress-container {
    margin-bottom: 25px;
}

.progress-bar-track {
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--color-brand-blue);
    border-radius: 3px;
    transition: width var(--transition-smooth);
}

.step-indicator {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
}

/* ==========================================================================
   STEP PANES (WIZARD FLOW)
   ========================================================================== */
.step-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.step-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
.step-pane h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-brand-navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.step-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 25px;
}

/* ==========================================================================
   WELCOME SCREEN (STEP 0)
   ========================================================================== */
.welcome-content {
    text-align: center;
    padding: 10px 0;
}

.welcome-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-brand-navy);
    margin-top: 15px;
    margin-bottom: 12px;
}

.welcome-content .subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 25px;
}

.icon-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background-color: rgba(77, 222, 97, 0.1);
    border: 2px solid var(--color-accent-green);
    border-radius: 50%;
    color: #34c04a;
    font-size: 1.6rem;
    animation: pulse 2s infinite;
}

.benefits-list {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    background: #f8fafc;
    padding: 18px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border-light);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefit-item i {
    color: #34c04a;
    font-size: 1rem;
    flex-shrink: 0;
}

.benefit-item span {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}

/* ==========================================================================
   INPUTS & FORM ELEMENTS
   ========================================================================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 25px;
}

.input-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-brand-navy);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.currency-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--border-radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.currency-input-wrapper:focus-within {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.15);
}

.currency-symbol {
    position: absolute;
    left: 14px;
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 1rem;
}

.currency-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    background: transparent;
    border: none;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 600;
    outline: none;
}

/* ==========================================================================
   QUICK SELECTOR GRID
   ========================================================================== */
.quick-selectors {
    margin-bottom: 30px;
}

.selector-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.grid-selectors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.btn-select {
    background: #f8fafc;
    border: 1px solid var(--color-border-light);
    color: #475569;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-select:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-select.selected {
    background: #eff6ff;
    border-color: var(--color-brand-blue);
    color: var(--color-brand-blue);
    box-shadow: 0 2px 4px rgba(0, 74, 173, 0.05);
}

/* ==========================================================================
   CARD SELECTION LIST (STEP 3)
   ========================================================================== */
.card-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.card-option-label {
    cursor: pointer;
    display: block;
}

.card-radio {
    display: none;
}

.card-option-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.card-option-label:hover .card-option-content {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.card-radio:checked + .card-option-content {
    border-color: var(--color-brand-blue);
    background: #f0f7ff;
}

.option-icon {
    font-size: 1.15rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Option Icons styles */
.card-radio:checked + .card-option-content .option-icon.text-success { color: #10b981; }
.card-radio:checked + .card-option-content .option-icon.text-warning { color: #f59e0b; }
.card-radio:checked + .card-option-content .option-icon.text-danger { color: #ef4444; }

.option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-brand-navy);
}

.option-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   NAVIGATION BUTTONS
   ========================================================================== */
.button-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn {
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Button matches Lime Green theme of 4C Innovation */
.btn-primary {
    background-color: var(--color-accent-green);
    color: var(--color-brand-navy);
    box-shadow: 0 2px 4px rgba(77, 222, 97, 0.2);
    flex-grow: 2;
}

.btn-primary:hover:not(:disabled) {
    background-color: #3ec752;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(77, 222, 97, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--color-border-light);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Success Button matches diagnostic completion */
.btn-success {
    background-color: var(--color-accent-green);
    color: var(--color-brand-navy);
    box-shadow: 0 2px 4px rgba(77, 222, 97, 0.2);
    flex-grow: 2;
}

.btn-success:hover {
    background-color: #3ec752;
    transform: translateY(-1px);
}

.btn-secondary-outline {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border-light);
    width: 100%;
}

.btn-secondary-outline:hover {
    background: #f8fafc;
    color: var(--color-text-main);
}

/* ==========================================================================
   LOADING ANIMATION (STEP LOADING)
   ========================================================================== */
.loading-content {
    text-align: center;
    padding: 20px 0;
}

.spinner-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid var(--color-brand-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.center-spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--color-brand-navy);
}

.loading-content h3 {
    font-size: 1.1rem;
    color: var(--color-brand-navy);
    margin-bottom: 20px;
}

.loading-steps-indicator {
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loading-step-item {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-step-item.active {
    color: var(--color-text-main);
    font-weight: 600;
}

.loading-step-item.success {
    color: #10b981;
}

/* ==========================================================================
   RESULTS SCREEN (STEP RESULT)
   ========================================================================== */
.result-container {
    text-align: center;
}

.result-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* Diagnostic Themes */
.result-green {
    background-color: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}

.result-yellow {
    background-color: var(--color-warning-bg);
    color: var(--color-warning-text);
    border: 1px solid var(--color-warning-border);
}

.result-red {
    background-color: var(--color-danger-bg);
    color: var(--color-danger-text);
    border: 1px solid var(--color-danger-border);
}

.result-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-brand-navy);
    margin-bottom: 6px;
}

.result-subtitle {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* Diagnosis Metrics Card Grid */
.diagnosis-summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.summary-item-card {
    background: #f8fafc;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-item-card .card-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.summary-item-card .card-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-brand-navy);
}

/* Feedback Box */
.feedback-message-box {
    background: #f8fafc;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    padding: 16px;
    text-align: left;
    margin-bottom: 25px;
}

.feedback-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--color-text-main);
    font-weight: 500;
}

.feedback-points {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-point-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    line-height: 1.4;
}

.feedback-point-item i {
    font-size: 0.85rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.feedback-point-item.point-check i { color: #10b981; }
.feedback-point-item.point-warn i { color: #f59e0b; }
.feedback-point-item.point-times i { color: #ef4444; }
.feedback-point-item.point-info i { color: var(--color-brand-blue); }

.feedback-point-item span {
    color: #475569;
}

/* WhatsApp CTA Button */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    font-size: 0.92rem;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
    margin-bottom: 8px;
    width: 100%;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #20ba59 0%, #0e7065 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.app-footer {
    text-align: center;
    padding: 10px 0;
    color: var(--color-text-muted);
}

.app-footer p {
    font-size: 0.72rem;
    line-height: 1.4;
}

.footer-small {
    margin-top: 6px;
    opacity: 0.8;
    font-size: 0.65rem;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 222, 97, 0.3);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(77, 222, 97, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(77, 222, 97, 0);
    }
}

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

/* ==========================================================================
   MEDIA QUERIES (ADDITIONAL RESPONSIVENESS)
   ========================================================================== */
@media (max-width: 400px) {
    body {
        padding: 10px;
    }
    
    .diagnostic-card {
        padding: 20px 15px;
    }
    
    .btn {
        padding: 10px 16px;
    }
    
    .grid-selectors {
        grid-template-columns: 1fr;
    }
}
