/* ULTRA-CLEAN MODERN WHITE FINTECH THEME - PHASE 04 */

:root {
    --bg-main: #FAFAFB;
    --bg-card: #FFFFFF;
    --bg-slate: #F8FAFC;
    --bg-highlight: #F0FDF4; /* Very light green background for new section */
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    --brand-primary: #2563EB;
    --brand-accent: #059669; /* Green for Success/Savings */
    --brand-accent-light: #ECFDF5;
    --brand-danger: #DC2626; /* Red for Debt */
    --brand-danger-light: #FEF2F2;
    
    --border-subtle: #E2E8F0;
    --border-hover: #CBD5E1;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.25s ease;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', sans-serif;
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero {
    position: relative; padding: 80px 0 50px 0;
    background: linear-gradient(180deg, #F1F5F9 0%, #FAFAFB 100%);
    border-bottom: 1px solid var(--border-subtle); overflow: hidden; text-align: center;
}
.hero-bg-shapes .shape { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; }
.shape-1 { width: 250px; height: 250px; background: #FECACA; top: -20px; left: 5%; }
.shape-2 { width: 300px; height: 300px; background: #A7F3D0; bottom: -50px; right: 5%; }
.hero-content { position: relative; z-index: 1; }

.pill-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: #FFF; border: 1px solid var(--border-subtle);
    padding: 6px 16px; border-radius: 100px; font-size: 0.75rem;
    font-weight: 700; color: var(--text-primary); box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.pulse-dot { width: 8px; height: 8px; background-color: var(--text-primary); border-radius: 50%; }

.hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.hero-sub { font-size: 1.05rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto; }

/* General Layout */
.section { padding: 60px 0; border-bottom: 1px solid var(--border-subtle); }
.section-header { margin-bottom: 32px; }
.section-tag { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); letter-spacing: 0.1em; display: block; margin-bottom: 4px; }
.section-header h2 { font-size: 1.6rem; font-weight: 800; }
.section-header p { color: var(--text-secondary); font-size: 0.95rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.margin-bottom-16 { margin-bottom: 16px; }

/* Cards */
.card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 24px; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.full-width-card { width: 100%; }
.bg-slate { background: var(--bg-slate); }

.tool-card-interactive { box-shadow: var(--shadow-card); }
.border-danger { border-top: 4px solid var(--brand-danger); }
.border-success { border-top: 4px solid var(--brand-accent); }

/* Steps */
.step-card { position: relative; padding-top: 36px; }
.step-num { 
    position: absolute; top: -12px; left: 24px;
    background: var(--text-primary); color: #FFF; font-size: 0.75rem; font-weight: 800;
    padding: 4px 12px; border-radius: 6px; 
}
.step-danger { background: var(--brand-danger); }
.step-success { background: var(--brand-accent); }
.active-step { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Inputs */
.card-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.badge-danger { background: var(--brand-danger-light); color: var(--brand-danger); font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 100px; }
.badge-accent { background: var(--brand-accent-light); color: var(--brand-accent); font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 100px; }

.input-field-group { margin-bottom: 16px; }
.input-field-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.input-field-group input {
    width: 100%; padding: 12px; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); font-size: 1rem; font-weight: 700; background: var(--bg-main); outline: none; transition: var(--transition);
}
.input-field-group input:focus { border-color: var(--text-primary); background: #FFF; }

/* Debt Results */
.error-msg { background: #FEE2E2; color: #B91C1C; padding: 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; }
.comparison-box { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.comp-item { background: #FFF; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.active-comp { border-color: var(--brand-accent); box-shadow: 0 0 0 1px var(--brand-accent); }
.comp-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.comp-val { font-size: 1.4rem; font-weight: 800; margin: 4px 0; }
.comp-sub { font-size: 0.8rem; color: var(--text-muted); }
.text-accent { color: var(--brand-accent); }

.savings-highlight { background: var(--text-primary); color: #FFF; padding: 20px; border-radius: var(--radius-md); text-align: center; }
.sh-title { font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.sh-val { font-size: 1.8rem; font-weight: 800; color: #FBBF24; }
.sh-sub { font-size: 0.9rem; font-weight: 600; margin-top: 4px; }

/* EF Results */
.ef-results-container { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.target-box { background: var(--bg-slate); border: 1px solid var(--border-subtle); padding: 20px; border-radius: var(--radius-md); text-align: center; }
.tb-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.tb-val { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); margin-top: 4px; }

.timeline-box { display: flex; gap: 16px; align-items: center; background: #FFF; border: 1px solid var(--brand-accent-light); padding: 20px; border-radius: var(--radius-md); }
.tl-icon { font-size: 2rem; }
.tl-title { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.tl-val { font-size: 1.5rem; font-weight: 800; margin: 2px 0; }
.tl-sub { font-size: 0.8rem; color: var(--text-muted); }

.rule-box { background: var(--brand-danger-light); border-left: 4px solid var(--brand-danger); padding: 12px 16px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 0.8rem; color: #7F1D1D; }

/* Module 4: Advanced Tactics (NEW) */
.bg-highlight-section { background: var(--bg-highlight); margin: 40px 24px; padding: 40px; border-radius: var(--radius-lg); border: 1px dashed #BBF7D0; }
.adv-card { display: flex; gap: 16px; align-items: flex-start; background: #FFFFFF; border: none; box-shadow: var(--shadow-sm); }
.adv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.adv-icon { font-size: 2rem; background: var(--brand-accent-light); padding: 12px; border-radius: var(--radius-md); }
.adv-content h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-primary); }
.adv-content p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

footer { padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border-subtle); margin-top: 40px; }

@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .bg-highlight-section { margin: 20px 0; padding: 30px 16px; border-radius: 0; border-left: none; border-right: none; }
}





/* ULTRA-CLEAN MODERN WHITE FINTECH THEME - PHASE 04 */

:root {
    --bg-main: #FAFAFB;
    --bg-card: #FFFFFF;
    --bg-slate: #F8FAFC;
    --bg-highlight: #F0FDF4;
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    --brand-primary: #2563EB;
    --brand-accent: #059669; 
    --brand-accent-light: #ECFDF5;
    --brand-danger: #DC2626; 
    --brand-danger-light: #FEF2F2;
    --brand-warning: #D97706;
    --brand-warning-light: #FFFBEB;
    
    --border-subtle: #E2E8F0;
    --border-hover: #CBD5E1;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.25s ease;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', sans-serif;
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero {
    position: relative; padding: 80px 0 50px 0;
    background: linear-gradient(180deg, #F1F5F9 0%, #FAFAFB 100%);
    border-bottom: 1px solid var(--border-subtle); overflow: hidden; text-align: center;
}
.hero-bg-shapes .shape { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; }
.shape-1 { width: 250px; height: 250px; background: #FECACA; top: -20px; left: 5%; }
.shape-2 { width: 300px; height: 300px; background: #A7F3D0; bottom: -50px; right: 5%; }
.hero-content { position: relative; z-index: 1; }

.pill-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: #FFF; border: 1px solid var(--border-subtle);
    padding: 6px 16px; border-radius: 100px; font-size: 0.75rem;
    font-weight: 700; color: var(--text-primary); box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.pulse-dot { width: 8px; height: 8px; background-color: var(--text-primary); border-radius: 50%; }

.hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.hero-sub { font-size: 1.05rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto; }

/* General Layout */
.section { padding: 60px 0; border-bottom: 1px solid var(--border-subtle); }
.section-header { margin-bottom: 32px; }
.section-tag { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); letter-spacing: 0.1em; display: block; margin-bottom: 4px; }
.section-header h2 { font-size: 1.6rem; font-weight: 800; }
.section-header p { color: var(--text-secondary); font-size: 0.95rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.margin-bottom-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }

/* Cards */
.card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 24px; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.full-width-card { width: 100%; }
.bg-slate { background: var(--bg-slate); }

.tool-card-interactive { box-shadow: var(--shadow-card); }
.border-primary { border-top: 4px solid var(--brand-primary); }
.border-danger { border-top: 4px solid var(--brand-danger); }
.border-success { border-top: 4px solid var(--brand-accent); }

/* Steps */
.step-card { position: relative; padding-top: 36px; }
.step-num { 
    position: absolute; top: -12px; left: 24px;
    background: var(--text-primary); color: #FFF; font-size: 0.75rem; font-weight: 800;
    padding: 4px 12px; border-radius: 6px; 
}
.step-danger { background: var(--brand-danger); }
.step-success { background: var(--brand-accent); }
.active-step { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Inputs */
.card-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.badge-danger { background: var(--brand-danger-light); color: var(--brand-danger); font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 100px; }
.badge-accent { background: var(--brand-accent-light); color: var(--brand-accent); font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 100px; }

.input-field-group { margin-bottom: 16px; }
.input-field-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.input-field-group input {
    width: 100%; padding: 12px; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); font-size: 1rem; font-weight: 700; background: var(--bg-main); outline: none; transition: var(--transition);
}
.input-field-group input:focus { border-color: var(--text-primary); background: #FFF; }

/* Debt Results */
.error-msg { background: #FEE2E2; color: #B91C1C; padding: 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; }
.comparison-box { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.comp-item { background: #FFF; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.active-comp { border-color: var(--brand-accent); box-shadow: 0 0 0 1px var(--brand-accent); }
.comp-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.comp-val { font-size: 1.4rem; font-weight: 800; margin: 4px 0; }
.comp-sub { font-size: 0.8rem; color: var(--text-muted); }
.text-accent { color: var(--brand-accent); }

.savings-highlight { background: var(--text-primary); color: #FFF; padding: 20px; border-radius: var(--radius-md); text-align: center; }
.sh-title { font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.sh-val { font-size: 1.8rem; font-weight: 800; color: #FBBF24; }
.sh-sub { font-size: 0.9rem; font-weight: 600; margin-top: 4px; }

/* EF Results */
.ef-results-container { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.target-box { background: var(--bg-slate); border: 1px solid var(--border-subtle); padding: 20px; border-radius: var(--radius-md); text-align: center; }
.tb-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.tb-val { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); margin-top: 4px; }

.timeline-box { display: flex; gap: 16px; align-items: center; background: #FFF; border: 1px solid var(--brand-accent-light); padding: 20px; border-radius: var(--radius-md); }
.tl-icon { font-size: 2rem; }
.tl-title { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.tl-val { font-size: 1.5rem; font-weight: 800; margin: 2px 0; }
.tl-sub { font-size: 0.8rem; color: var(--text-muted); }

.rule-box { background: var(--brand-danger-light); border-left: 4px solid var(--brand-danger); padding: 12px 16px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 0.8rem; color: #7F1D1D; }

/* Module 4: Advanced Tactics */
.bg-highlight-section { background: var(--bg-highlight); margin: 40px 24px; padding: 40px; border-radius: var(--radius-lg); border: 1px dashed #BBF7D0; }
.adv-card { display: flex; gap: 16px; align-items: flex-start; background: #FFFFFF; border: none; box-shadow: var(--shadow-sm); }
.adv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.adv-icon { font-size: 2rem; background: var(--brand-accent-light); padding: 12px; border-radius: var(--radius-md); }
.adv-content h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-primary); }
.adv-content p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

/* Module 5: Debt Golden Rules */
.debt-type { display: flex; gap: 16px; padding: 16px; border-radius: var(--radius-md); margin-bottom: 16px; border: 1px solid transparent; }
.good-debt { background: var(--brand-accent-light); border-color: #A7F3D0; }
.bad-debt { background: var(--brand-danger-light); border-color: #FECACA; }
.debt-icon { font-size: 1.8rem; }
.debt-details h4 { font-size: 1.05rem; margin-bottom: 6px; }
.good-debt h4 { color: var(--brand-accent); }
.bad-debt h4 { color: var(--brand-danger); }
.debt-details p { font-size: 0.9rem; color: var(--text-secondary); }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: #FFF; padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.check-icon { background: var(--brand-primary); color: #FFF; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.8rem; font-weight: bold; flex-shrink: 0; }
.check-content strong { display: block; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 4px; }
.check-content p { font-size: 0.85rem; color: var(--text-secondary); }

.warning-banner { background: var(--brand-warning-light); border-left: 4px solid var(--brand-warning); padding: 16px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 0.9rem; color: #92400E; }

footer { padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border-subtle); margin-top: 40px; }

@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .bg-highlight-section { margin: 20px 0; padding: 30px 16px; border-radius: 0; border-left: none; border-right: none; }
}
/* Next Page Button Styling */
.next-page-container {
    text-align: center;
    margin: 60px 0 20px 0;
}

.next-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.35);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.next-page-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.5s;
}

.next-page-btn:hover::before {
    left: 100%;
}

.next-page-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.45);
}

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

.next-page-btn:hover .btn-arrow {
    transform: translateX(6px);
}