/* ==========================================================================
   SmartLoan - Mobile-First Responsive Stylesheet
   Inspired by modern banking & personal loan landing page patterns
   ========================================================================== */

:root {
    --primary-blue: #0F4C81;
    --primary-blue-dark: #0A3258;
    --primary-blue-light: #EBF4FC;
    --accent-orange: #ED7D18;
    --accent-orange-hover: #D96C0C;
    --text-dark: #1F2A37;
    --text-muted: #6B7280;
    --bg-light: #F4F6F9;
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    --font-main: 'Kanit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 90px; /* Space for fixed bottom CTA bar */
}

/* Desktop Centering Wrapper to simulate mobile on large screens */
.page-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--white);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ==========================================================================
   Header Section
   ========================================================================== */
.app-header {
    width: 100%;
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #F0F2F5;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
}

.header-container {
    width: 100%;
    max-width: 480px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-img {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-logo .logo-c2go {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.brand-logo .logo-c {
    color: #0077D4; /* ពណ៌ខៀវ (Vibrant Blue) */
}

.brand-logo .logo-2 {
    color: #FF7A00; /* ពណ៌ទឹកក្រូច (Vivid Orange) */
}

.brand-logo .logo-go {
    color: #0A2540; /* ពណ៌ទឹកប៊ិចចាស់ (Deep Navy Blue) */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-main);
    border-left: 1.5px solid #E5E7EB;
    padding-left: 12px;
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.breadcrumb-nav {
    padding: 10px 16px;
    font-size: 11px;
    color: #8C98A4;
    background-color: #F8FAFC;
    border-bottom: 1px solid #EDF2F7;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.breadcrumb-content .active {
    color: var(--primary-blue);
    font-weight: 500;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 16px 16px 8px 16px;
    background: linear-gradient(180deg, #F8FAFC 0%, var(--white) 100%);
}

.hero-card {
    background: linear-gradient(135deg, #0C3860 0%, #17548A 100%);
    border-radius: var(--radius-md);
    padding: 24px 20px 16px 20px;
    color: var(--white);
    box-shadow: 0 8px 24px rgba(12, 56, 96, 0.25);
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 16px;
}

.hero-illustration {
    width: 100%;
    margin-top: 6px;
}

.hero-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Product Details Section (Card)
   ========================================================================== */
.product-card-section {
    padding: 12px 16px;
}

.loan-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid #EDF2F7;
    box-shadow: var(--shadow-sm);
    padding: 24px 20px;
}

.loan-title {
    font-size: 23px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.loan-description {
    font-size: 14.5px;
    font-weight: 300;
    color: #64748B;
    line-height: 1.65;
    margin-bottom: 24px;
}

/* Feature List */
.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-icon-wrapper {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background-color: var(--primary-blue-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.feature-text strong {
    font-size: 15px;
    font-weight: 500;
    color: #1E293B;
}

.feature-text span {
    font-size: 13.5px;
    font-weight: 300;
    color: #64748B;
}

/* ==========================================================================
   Loan Calculator Section
   ========================================================================== */
.calculator-section {
    padding: 8px 16px;
}

.calc-card {
    background-color: #F8FAFD;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 20px;
}

.calc-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

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

.calc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.calc-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-blue);
}

.slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #CBD5E1;
    border-radius: 4px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--accent-orange);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(237, 125, 24, 0.4);
    border: 2px solid var(--white);
}

.calc-result-box {
    background: var(--white);
    border: 1px dashed #CBD5E1;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}

.result-label {
    font-size: 13px;
    color: var(--text-muted);
}

.result-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-orange);
}

.result-number span {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ==========================================================================
   Steps Section
   ========================================================================== */
.steps-section {
    padding: 16px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #FAFAFC;
    border: 1px solid #ECEEF2;
    padding: 14px;
    border-radius: 12px;
}

.step-num {
    width: 34px;
    height: 34px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.step-info strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
}

.step-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
    padding: 24px 16px 40px 16px;
    background-color: #F1F4F9;
    border-top: 1px solid #E2E8F0;
    text-align: center;
    font-size: 11px;
    color: #8C98A4;
    line-height: 1.6;
    margin-top: auto;
}

.disclaimer-text {
    margin-bottom: 12px;
}

/* ==========================================================================
   Fixed Bottom CTA Bar (High Conversion Element)
   ========================================================================== */
.floating-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
}

.cta-inner {
    width: 100%;
    max-width: 480px;
}

.btn-primary-orange {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    background: var(--accent-orange);
    color: var(--white);
    text-decoration: none;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.2px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 14px rgba(237, 125, 24, 0.35);
    transition: all 0.2s ease;
}

.btn-primary-orange:active {
    transform: scale(0.98);
    background: var(--accent-orange-hover);
}

/* Floating Like Button */
.fab-like {
    position: fixed;
    right: calc(50% - 220px);
    bottom: 80px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 98;
    transition: transform 0.2s;
}

@media (max-width: 480px) {
    .fab-like {
        right: 16px;
    }
}

.fab-like:active {
    transform: scale(0.9);
}

/* ==========================================================================
   Cookie Consent Modal
   ========================================================================== */
.cookie-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.cookie-modal-backdrop.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cookie-modal-box {
    background: var(--white);
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius-md);
    padding: 24px 22px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.35s ease;
}

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

.cookie-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
    padding-right: 28px;
}

.cookie-desc {
    font-size: 13px;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 22px;
}

.cookie-link {
    color: var(--accent-orange);
    text-decoration: underline;
}

.btn-cookie-accept {
    width: 100%;
    height: 48px;
    background: var(--accent-orange);
    color: var(--white);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(237, 125, 24, 0.3);
    transition: background 0.2s;
}

.btn-cookie-accept:active {
    background: var(--accent-orange-hover);
}

