/* =====================================================
   MFNXT CALCULATOR
   Shared Calculator Components
===================================================== */

.calculator-section {
    position: relative;
    overflow: hidden;
    padding: 90px 0 100px;
    background:
        radial-gradient(
            circle at 90% 15%,
            rgba(0, 92, 200, .09),
            transparent 28%
        ),
        radial-gradient(
            circle at 5% 90%,
            rgba(227, 6, 19, .035),
            transparent 25%
        ),
        linear-gradient(
            180deg,
            #F7FBFF 0%,
            #FFFFFF 100%
        );
}

.calculator-section::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -120px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(0, 92, 200, .06);
    border-radius: 50%;
    pointer-events: none;
}

.calculator-section::after {
    content: "";
    position: absolute;
    bottom: -220px;
    left: -150px;
    width: 460px;
    height: 460px;
    border: 1px solid rgba(227, 6, 19, .045);
    border-radius: 50%;
    pointer-events: none;
}

/* =====================================================
   CALCULATOR HEADER
===================================================== */

.calculator-header {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.calculator-header .calculator-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--secondary-color);
    font-family: var(--third-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.2;
    text-transform: uppercase;
}

.calculator-header .calculator-eyebrow i {
    font-size: 14px;
}

.calculator-header h1 {
    margin: 0 0 15px;
    color: var(--c-ink, #0F172A);
    font-family: var(--third-font);
    font-size: clamp(38px, 5.1vw, 56px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -2px;
}

.calculator-header h1 span {
    color: var(--primary-color, #005CC8);
}

.calculator-header p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--c-muted, #64748B);
    font-family: var(--third-font, var(--heading-font));
    font-size: clamp(16px, 1.2vw, 18px);
    font-weight: 400;
    line-height: 1.7;
}

/* =====================================================
   CALCULATOR GRID
===================================================== */

.calculator-section .row {
    position: relative;
    z-index: 2;
}

.calculator-section .calculator-card,
.calculator-section .result-card {
    height: 100%;
    padding: 32px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow:
        0 25px 60px rgba(15, 23, 42, .07),
        0 5px 18px rgba(15, 23, 42, .035);
}

/* =====================================================
   INPUT CARD
===================================================== */

.calculator-section .calculator-card {
    position: relative;
    overflow: hidden;
}

.calculator-section .calculator-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color, #005CC8),
        #3B82F6
    );
}

/* =====================================================
   INPUT GROUP
===================================================== */

.calculator-section .input-group-box {
    margin-bottom: 34px;
}

.calculator-section .input-group-box:last-child {
    margin-bottom: 0;
}

.calculator-section .input-group-box label {
    display: block;
    margin-bottom: 11px;
    color: var(--c-ink, #0F172A);
    font-family: var(--third-font, var(--heading-font));
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* =====================================================
   AMOUNT DISPLAY
===================================================== */

.calculator-section .amount-display {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 43px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(0, 92, 200, .10);
    border-radius: 11px;
    background: #F3F8FF;
    color: var(--primary-color, #005CC8);
    font-family: var(--third-font, var(--heading-font));
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

/* =====================================================
   RANGE SLIDER
===================================================== */

.calculator-section input[type="range"] {
    width: 100%;
    height: 5px;
    margin: 5px 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 10px;
    outline: none;
    background: #DCE5EF;
    cursor: pointer;
}

.calculator-section input[type="range"]::-webkit-slider-thumb {
    width: 19px;
    height: 19px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: var(--primary-color, #005CC8);
    box-shadow: 0 2px 8px rgba(0, 92, 200, .25);
}

.calculator-section input[type="range"]::-moz-range-thumb {
    width: 19px;
    height: 19px;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: var(--primary-color, #005CC8);
    box-shadow: 0 2px 8px rgba(0, 92, 200, .25);
    cursor: pointer;
}

/* =====================================================
   RESULT CARD
===================================================== */

.calculator-section .result-card {
    position: relative;
    overflow: hidden;
}

.calculator-section .result-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--secondary-color, #E30613),
        var(--primary-color, #005CC8)
    );
}

/* =====================================================
   RESULT CHART
===================================================== */

.calculator-section #lumpsumChart,
.calculator-section #sipChart {
    display: block;
    width: 100%;
    max-width: 300px;
    max-height: 300px;
    margin: 4px auto 28px;
}

/* =====================================================
   RESULT ITEMS
===================================================== */

.calculator-section .result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #E8EDF3;
}

.calculator-section .result-item span {
    color: var(--c-muted, #64748B);
    font-family: var(--third-font, var(--heading-font));
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.calculator-section .result-item strong {
    color: var(--c-ink, #0F172A);
    font-family: var(--third-font, var(--heading-font));
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.calculator-section .result-item.total {
    padding-top: 19px;
    border-bottom: 0;
}

.calculator-section .result-item.total span {
    color: var(--c-ink, #0F172A);
    font-weight: 600;
}

.calculator-section .result-item.total strong {
    color: var(--primary-color, #005CC8);
    font-size: 21px;
}

/* =====================================================
   INVEST BUTTON
===================================================== */

.calculator-section .btn-invest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: 21px;
    padding: 0 18px;
    border-radius: 11px;
    background: var(--primary-color, #005CC8);
    color: #FFFFFF;
    font-family: var(--third-font, var(--heading-font));
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 92, 200, .16);
    transition:
        transform .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}

.calculator-section .btn-invest:hover {
    background: var(--primary-color-deep, #004A9F);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 92, 200, .22);
}

.calculator-section .result-card .small {
    margin: 12px 0 0;
    color: var(--c-muted, #64748B);
    font-family: var(--third-font, var(--heading-font));
    font-size: 12px;
    line-height: 1.6;
}

#lumpsumChart {
    display: block;
    width: 260px !important;
    height: 360px !important;
    max-width: 100%;
    margin: 0 auto 20px;
}

/* =====================================================
   EDITABLE CALCULATOR INPUT
===================================================== */

.calculator-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.calculator-number-input {
    width: 135px;
    height: 43px;
    padding: 8px 12px;
    border: 1px solid #DCE5EF;
    border-radius: 11px;
    outline: none;
    background: #FFFFFF;
    color: var(--c-ink, #0F172A);
    font-family: var(--third-font, var(--heading-font));
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.calculator-number-input:focus {
    border-color: var(--primary-color, #005CC8);
    box-shadow: 0 0 0 3px rgba(0, 92, 200, .08);
}

.calculator-number-input::-webkit-inner-spin-button,
.calculator-number-input::-webkit-outer-spin-button {
    margin: 0;
}

@media (max-width: 480px) {

    .calculator-input-row {
        gap: 10px;
    }

    .calculator-number-input {
        width: 115px;
        font-size: 14px;
    }

    .calculator-section .amount-display {
        font-size: 15px;
    }
}
/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 991px) {

    .calculator-section {
        padding: 75px 0 85px;
    }

    .calculator-section .calculator-card,
    .calculator-section .result-card {
        padding: 28px;
    }

    .calculator-header {
        margin-bottom: 38px;
    }
}

@media (max-width: 575px) {
    #lumpsumChart {
        width: 220px !important;
        height: 320px !important;
        margin-bottom: 15px;
    }
}

@media (max-width: 767px) {

    .calculator-section {
        padding: 60px 0 70px;
    }

    .calculator-header {
        margin-bottom: 32px;
    }

    .calculator-header h1 {
        font-size: clamp(36px, 10vw, 46px);
        letter-spacing: -1.5px;
    }

    .calculator-header p {
        font-size: 16px;
    }

    .calculator-section .calculator-card,
    .calculator-section .result-card {
        padding: 23px;
        border-radius: 20px;
    }

    .calculator-section .input-group-box {
        margin-bottom: 28px;
    }

    .calculator-section .result-item {
        padding: 14px 0;
    }
}

@media (max-width: 480px) {

    .calculator-section {
        padding: 50px 0 60px;
    }

    .calculator-section .calculator-card,
    .calculator-section .result-card {
        padding: 20px;
        border-radius: 18px;
    }

    .calculator-header h1 {
        font-size: 34px;
    }

    .calculator-header p {
        font-size: 15px;
    }

    .calculator-section .result-item span {
        font-size: 13px;
    }

    .calculator-section .result-item strong {
        font-size: 14px;
    }

    .calculator-section .result-item.total strong {
        font-size: 19px;
    }
}