/* ================================
   CALCULATOR SECTION STYLES - HTML VERSION EXACT REPLICA
   ================================ */

/* Section Base */
.calculator-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, white 50%, rgba(16, 185, 129, 0.02) 100%);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

/* Calculator Section Header */
.calculator-section .section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-medium);
    max-width: 48rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Savings Calculator Card - HTML Version */
.savings-calculator-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: visible;
}

.savings-calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-blue);
}

/* Side-by-Side Calculator Layout */
.calculator-main-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.calculator-inputs-section {
    flex: 0 0 38%;
    position: sticky;
    top: 2rem;
}

.calculator-results-section {
    flex: 1;
    min-width: 0;
}

.calculator-inputs {
    margin-bottom: 40px;
}

.input-group {
    text-align: left;
    margin-bottom: 2rem;
}

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

.input-group label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
}

.input-box-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-row {
    width: 100%;
}

.currency {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.tenure-suffix {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-medium);
}

#dailySavings,
#tenure {
    width: 120px;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

#dailySavings:focus,
#tenure:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

#dailySavingsSlider,
#tenureSlider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-light);
    outline: none;
    appearance: none;
    cursor: pointer;
}

#dailySavingsSlider::-webkit-slider-thumb,
#tenureSlider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

#dailySavingsSlider::-moz-range-thumb,
#tenureSlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    border: none;
}

.quick-amounts {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-amounts button {
    padding: 8px 16px;
    border: 2px solid var(--border-light);
    border-radius: 25px;
    background: white;
    color: var(--text-medium);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-amounts button:hover,
.quick-amounts button.active {
    border-color: var(--success-green);
    background: var(--success-green);
    color: white;
    transform: translateY(-2px);
}

.calculator-results {
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.result-card {
    background: var(--bg-light);
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-card.highlighted {
    background: linear-gradient(135deg, var(--primary-blue), var(--success-green));
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.result-card .duration {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.8;
    font-weight: 600;
}

.result-card .amount {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 4px;
}

.result-card .growth {
    font-size: 0.8rem;
    opacity: 0.9;
}

.calculator-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   FREQUENCY SELECTOR
   ================================ */
.frequency-selector {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.frequency-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-medium);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.frequency-btn:hover {
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.05);
}

.frequency-btn.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

/* ================================
   PIE CHART
   ================================ */
.pie-chart-container {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
    align-items: center;
}

#sipPieChart {
    max-width: 250px;
    max-height: 250px;
    margin: 0 auto;
}

/* ================================
   COMPACT RESULT CARDS - EQUATION FORMAT (Invested + Returns = Maturity)
   ================================ */
.result-cards-large {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

.result-card-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.875rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    min-height: 120px;
}

.result-card-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Operator Symbols (+ and =) */
.card-operator {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-medium);
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Icons - Minimal inline style */
.card-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 0.35rem;
    vertical-align: middle;
    flex-shrink: 0;
}

.card-icon-blue {
    color: var(--primary-blue);
}

.card-icon-green {
    color: var(--success-green);
}

.card-icon-purple {
    color: #8B5CF6;
}

.result-card-highlighted .card-icon-purple {
    color: rgba(255, 255, 255, 0.9);
}

/* Card Content */
.card-content {
    width: 100%;
}

.card-value {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.card-percentage {
    font-size: 0.85rem;
    color: var(--success-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
}

.card-years {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
}

.card-spacer {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
    visibility: hidden;
}

.card-label {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 500;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Highlighted Maturity Card */
.result-card-highlighted {
    background: var(--primary-blue);
    border: 2px solid transparent;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.result-card-highlighted .card-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-card-highlighted .card-value {
    color: white;
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}

.result-card-highlighted:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.3);
}

/* ================================
   CTA BUTTON
   ================================ */
.invest-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.125rem 2rem;
    background: var(--success-green);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    margin: 2rem 0 0 0;
}

.invest-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.invest-now-btn:active {
    transform: translateY(-1px);
}

.invest-now-btn svg {
    transition: transform 0.3s ease;
}

.invest-now-btn:hover svg {
    transform: translateX(4px);
}

/* ================================
   SUMMARY BREAKDOWN SECTION (REMOVED)
   ================================ */
.calculator-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(16, 185, 129, 0.02) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.summary-icon-blue {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.summary-icon-green {
    background: linear-gradient(135deg, var(--success-green), var(--success-light));
}

.summary-icon-purple {
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* ================================
   RESPONSIVE DESIGN - HTML VERSION
   ================================ */

@media (max-width: 1200px) {
    /* Intermediate breakpoint for better card spacing */
    .result-card-large {
        max-width: 170px;
        min-height: 110px;
    }

    .card-operator {
        font-size: 1.5rem;
        padding: 0 0.35rem;
    }
}

@media (max-width: 1024px) {
    .calculator-section {
        padding: 60px 0;
    }

    .savings-calculator-card {
        padding: 30px;
        margin: 30px 0;
    }

    .calculator-header h3 {
        font-size: 1.75rem;
    }

    /* Stack side-by-side layout vertically on tablet */
    .calculator-main-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .calculator-inputs-section {
        flex: 1;
        position: static;
        width: 100%;
    }

    .calculator-results-section {
        width: 100%;
    }

    .input-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #dailySavingsSlider,
    #tenureSlider {
        width: 100%;
    }

    /* Adjust chart bars for tablet */
    .chart-bars {
        height: 100px;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .calculator-section {
        padding: 40px 0;
    }

    .savings-calculator-card {
        padding: 20px;
    }

    .calculator-inputs {
        margin-bottom: 30px;
    }

    .frequency-selector {
        max-width: 100%;
        gap: 0.5rem;
    }

    .frequency-btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    #dailySavings,
    #tenure {
        width: 100px;
        font-size: 1.1rem;
        padding: 10px 12px;
    }

    .currency {
        font-size: 1.1rem;
    }

    .tenure-suffix {
        font-size: 0.85rem;
    }

    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .result-card {
        padding: 16px 12px;
    }

    .result-card .amount {
        font-size: 1.25rem;
    }

    /* Pie chart styles for mobile */
    .pie-chart-container {
        padding: 1.5rem;
    }

    #sipPieChart {
        max-width: 220px;
        max-height: 220px;
    }

    /* Compact result cards for mobile - stack vertically */
    .result-cards-large {
        flex-direction: column;
        gap: 0.875rem;
    }

    .result-card-large {
        padding: 0.875rem 0.75rem;
        gap: 0.5rem;
        max-width: 100%;
        width: 100%;
        min-height: auto;
    }

    .card-operator {
        font-size: 1.5rem;
        padding: 0.25rem;
        transform: rotate(90deg);
    }

    .card-icon {
        width: 12px;
        height: 12px;
        margin-right: 0.3rem;
    }

    .card-label {
        font-size: 0.75rem;
    }

    .card-value {
        font-size: 1.35rem;
    }

    .card-percentage {
        font-size: 0.8rem;
    }

    .card-years {
        font-size: 0.75rem;
    }

    .result-card-highlighted .card-value {
        font-size: 1.5rem;
    }

    /* CTA Button for mobile */
    .invest-now-btn {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .calculator-summary {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .summary-icon {
        width: 44px;
        height: 44px;
    }

    .summary-value {
        font-size: 1.35rem;
    }
}

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

    .frequency-selector {
        padding: 0.375rem;
        gap: 0.375rem;
    }

    .frequency-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    #dailySavings,
    #tenure {
        width: 90px;
        font-size: 1rem;
        padding: 8px 10px;
    }

    .currency {
        font-size: 1rem;
    }

    .tenure-suffix {
        font-size: 0.8rem;
    }

    .input-group label {
        font-size: 1rem;
    }

    .quick-amounts {
        justify-content: stretch;
        gap: 8px;
    }

    .quick-amounts button {
        flex: 1;
        padding: 6px 12px;
    }

    /* Pie chart styles for small mobile */
    .pie-chart-container {
        padding: 1.25rem;
    }

    #sipPieChart {
        max-width: 200px;
        max-height: 200px;
    }

    /* Compact result cards for small mobile */
    .result-card-large {
        padding: 0.75rem 0.625rem;
        gap: 0.4rem;
    }

    .card-operator {
        font-size: 1.35rem;
        padding: 0.2rem;
    }

    .card-icon {
        width: 11px;
        height: 11px;
        margin-right: 0.25rem;
    }

    .card-label {
        font-size: 0.7rem;
    }

    .card-value {
        font-size: 1.25rem;
    }

    .result-card-highlighted .card-value {
        font-size: 1.4rem;
    }

    .card-percentage {
        font-size: 0.75rem;
    }

    .card-years {
        font-size: 0.7rem;
    }

    /* CTA Button for small mobile */
    .invest-now-btn {
        font-size: 0.95rem;
        padding: 0.95rem 1.25rem;
    }

    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .result-card .amount {
        font-size: 1.1rem;
    }

    .result-card .duration {
        font-size: 0.8rem;
    }

    .result-card .growth {
        font-size: 0.7rem;
    }

    .calculator-summary {
        padding: 1.25rem;
        gap: 1rem;
    }

    .summary-icon {
        width: 40px;
        height: 40px;
    }

    .summary-icon svg {
        width: 18px;
        height: 18px;
    }

    .summary-label {
        font-size: 0.8rem;
    }

    .summary-value {
        font-size: 1.25rem;
    }
}