:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7ff;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 40px 0 30px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.page-header p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Calculator Container */
.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0 50px;
}

.calculator-form {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.calculator-form h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.calculator-results {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.calculator-results h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

input[type="number"], input[type="range"], select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="number"]:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

input[type="range"] {
    padding: 0;
    height: 8px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 5px;
    margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.value-display {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--gray);
    margin-top: 5px;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary);
}

/* Results */
.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
}

.result-value {
    font-weight: 700;
    color: var(--primary);
}

.chart-container {
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
}

/* Frequency Options */
.frequency-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.frequency-option {
    flex: 1;
    text-align: center;
}

.frequency-option input {
    display: none;
}

.frequency-option label {
    display: block;
    padding: 10px;
    background: #f0f2f5;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.frequency-option input:checked + label {
    background: var(--primary);
    color: white;
}

/* Related Calculators */
.related-calculators {
    margin: 50px 0;
}

.related-calculators h2 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.calculator-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.calculator-card:hover {
    transform: translateY(-5px);
}

.calculator-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.calculator-card p {
    color: var(--gray);
    margin-bottom: 20px;
}

.calculator-card a {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.calculator-card a:hover {
    color: var(--secondary);
}

.calculator-card a i {
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }

    .frequency-options {
        flex-wrap: wrap;
    }

    .frequency-option {
        flex: 1 0 45%;
    }
}

.formula-box {
    background-color: #f9f9f9;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
}

.example-box {
    background-color: #e8f4fc;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.faq-question {
    font-weight: bold;
    color: #2c3e50;
    padding: 15px;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:after {
    content: '+';
    font-size: 20px;
}

.faq-question.active:after {
    content: '-';
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.faq-answer.show {
    padding: 15px;
    max-height: 500px;
}

.highlight {
    background-color: #fffde7;
    padding: 2px 5px;
    border-radius: 3px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #f2f2f2;
}

/* Payment Schedule */
/* Car Loan Calculator*/
/* Schedule Header */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.schedule-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn {
    background-color: #4361ee;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #3a56d4;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-options select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 120px; /* Wider select dropdown */
    background-color: white;
    cursor: pointer;
}

/* Table Container */
.table-container {
    max-height: 500px;
    overflow-y: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    position: relative;
}

#amortizationTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#amortizationTable th {
    position: sticky;
    top: 0;
    background: #4361ee;
    color: white;
    z-index: 10;
    padding: 12px 15px;
    text-align: center;
}

#amortizationTable td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.principal-amount {
    color: #2e7d32;
    font-weight: 500;
}

.interest-amount {
    color: #c62828;
    font-weight: 500;
}

/* Summary Section */
.schedule-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.summary-item span {
    color: #666;
    font-size: 14px;
}

.summary-item strong {
    color: #333;
    font-size: 16px;
    margin-top: 5px;
}

/* Currency Converter Swap Button */
/* Style for the swap button */
.swap-btn {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.swap-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3a0ca3, #4361ee);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swap-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.swap-btn:hover::before {
    opacity: 1;
}

.swap-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.4);
}

.swap-btn i {
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.swap-btn:hover i {
    transform: rotate(180deg);
}

/* Animation for swap action */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.swap-animation {
    animation: pulse 0.5s ease;
}

/* Tooltip for better UX */
.swap-btn::after {
    content: 'Swap currencies';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.swap-btn:hover::after {
    opacity: 1;
}


/* Mutual Funds */
/* Investment Type Toggle */
.investment-type {
    display: flex;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.investment-type-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.investment-type-btn.active {
    background: var(--primary);
    color: white;
}

/* SIP Section */
.sip-section {
    display: none;
    margin-bottom: 20px;
}

.sip-section.active {
    display: block;
}

/* Step-up Section */
.step-up-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 3px solid var(--primary);
}

.step-up-section h4 {
    margin-bottom: 10px;
    color: var(--dark);
}



/* PL Eligibility */
/* Eligibility Meter */
.eligibility-meter {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.eligibility-progress {
    height: 100%;
    background: linear-gradient(90deg, #f72585, #4361ee);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}