/* ========================================
   EMI Calculator Section
   ======================================== */

.emi-section {
    background: #fff;
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.emi-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 81, 0.06), transparent 70%);
    pointer-events: none;
}

.emi-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 45, 85, 0.04), transparent 70%);
    pointer-events: none;
}

/* Section Header */
.emi-section .section-title {
    color: var(--dark);
}

/* Calculator Card */
.emi-calculator-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(200, 169, 81, 0.15);
    padding: 50px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
}

.emi-calculator-card:hover {
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.emi-calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dark), var(--gold), var(--gold-light), var(--gold), var(--dark));
}

/* Inputs Side */
.emi-inputs {
    padding-right: 30px;
}

.emi-slider-group {
    margin-bottom: 35px;
}

.emi-slider-group:last-child {
    margin-bottom: 0;
}

.emi-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.emi-slider-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: 0.3px;
}

.emi-input-box {
    display: flex;
    align-items: center;
    background: var(--cream);
    border: 1.5px solid rgba(200, 169, 81, 0.25);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.emi-input-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.12);
}

.emi-input-box .prefix,
.emi-input-box .suffix {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 12px;
    background: rgba(200, 169, 81, 0.1);
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}

.emi-input-box input {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 14px;
    width: 100%;
    text-align: right;
    -moz-appearance: textfield;
}

.emi-input-box input::-webkit-outer-spin-button,
.emi-input-box input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Slider Range Labels */
.emi-slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.emi-slider-range span {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}

/* Custom Range Slider */
.emi-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--dark) 0%, var(--dark) 50%, #e0dcd4 50%, #e0dcd4 100%);
    outline: none;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.1s;
}

.emi-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--dark);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.emi-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.emi-range::-webkit-slider-thumb:active {
    transform: scale(1.2);
    background: var(--gold);
}

.emi-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--dark);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.emi-range::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.emi-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: transparent;
}

/* Vertical Divider */
.emi-divider-col {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.emi-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(200, 169, 81, 0.3), rgba(200, 169, 81, 0.5), rgba(200, 169, 81, 0.3), transparent);
    margin: 0 auto;
}

/* Results Side */
.emi-results {
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.emi-result-row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.emi-result-details {
    flex: 1;
}

/* Monthly EMI Display */
.emi-monthly {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(200, 169, 81, 0.15);
}

.emi-monthly-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.emi-monthly-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
}

.emi-monthly-value .rupee {
    font-size: 2rem;
    font-weight: 700;
}

/* Breakdown Items */
.emi-breakdown {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.emi-breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emi-breakdown-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.emi-breakdown-dot.principal {
    background: var(--dark);
}

.emi-breakdown-dot.interest {
    background: var(--gold);
}

.emi-breakdown-dot.total {
    background: #2d6a4f;
}

.emi-breakdown-info {
    flex: 1;
}

.emi-breakdown-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.emi-breakdown-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.emi-breakdown-value .rupee {
    font-size: 1rem;
    font-weight: 600;
}

/* Donut Chart */
.emi-chart-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emi-chart-container {
    position: relative;
    width: 190px;
    height: 190px;
}

#emiDonutChart {
    width: 190px;
    height: 190px;
}

.emi-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.emi-chart-center-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.emi-chart-center-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 2px;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 991px) {
    .emi-calculator-card {
        padding: 35px 30px;
    }

    .emi-inputs {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .emi-results {
        padding-left: 0;
    }

    .emi-divider-col {
        display: none;
    }

    .emi-result-row {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .emi-chart-wrapper {
        order: -1;
    }
}

@media (max-width: 767px) {
    .emi-section {
        padding: 70px 0;
    }

    .emi-calculator-card {
        padding: 25px 20px;
        border-radius: 18px;
    }

    .emi-monthly-value {
        font-size: 2rem;
    }

    .emi-monthly-value .rupee {
        font-size: 1.5rem;
    }

    .emi-breakdown-value {
        font-size: 1.05rem;
    }

    .emi-chart-container {
        width: 160px;
        height: 160px;
    }

    #emiDonutChart {
        width: 160px;
        height: 160px;
    }

    .emi-result-row {
        gap: 25px;
    }

    .emi-slider-group {
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .emi-calculator-card {
        padding: 20px 16px;
    }

    .emi-monthly-value {
        font-size: 1.7rem;
    }

    .emi-chart-container {
        width: 140px;
        height: 140px;
    }

    #emiDonutChart {
        width: 140px;
        height: 140px;
    }
}
