/* Advanced Loan Calculator Styles */

.calculator-page {
    min-height: 100vh;
    background: #f9fafb;
}

/* Hero Section */
.calculator-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    color: white;
}

.calculator-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.calculator-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 968px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* Calculator Card */
.calculator-card,
.results-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calculator-card h2,
.results-card h2 {
    color: #1f2937;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Calculator Groups */
.calc-group {
    margin-bottom: 2rem;
}

.calc-group label {
    display: block;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.calc-group label i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

/* Input Styles */
.calc-group input[type="number"],
.calc-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
}

.calc-group input[type="number"]:focus,
.calc-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Slider Styles */
.input-with-slider {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 50%, #e5e7eb 50%, #e5e7eb 100%);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Rate Display */
.rate-display {
    background: #f0fdf4;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.rate-display span {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.rate-display small {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Buttons */
.calc-button,
.calc-button-secondary {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.calc-button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    margin-bottom: 1rem;
}

.calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.calc-button-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.calc-button-secondary:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .results-summary {
        grid-template-columns: 1fr;
    }
}

.result-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-item.highlight {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #3b82f6;
}

.result-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.result-content {
    display: flex;
    flex-direction: column;
}

.result-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1f2937;
}

/* Breakdown Section */
.breakdown-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.breakdown-section h3 {
    color: #1f2937;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-table {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row.total {
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #3b82f6;
    margin-top: 0.5rem;
}

.breakdown-row span {
    color: #6b7280;
}

.breakdown-row strong {
    color: #1f2937;
    font-size: 1.1rem;
}

.breakdown-row.total strong {
    color: #3b82f6;
    font-size: 1.25rem;
}

/* Tier Info */
.tier-info {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tier-info p {
    color: #065f46;
    margin: 0;
}

/* Amortization Section */
.amortization-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.amortization-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.amortization-header h2 {
    color: #1f2937;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.toggle-schedule {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-schedule:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.amortization-table-container {
    overflow-x: auto;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
}

.amortization-table thead {
    background: #f9fafb;
}

.amortization-table th {
    padding: 1rem;
    text-align: left;
    color: #1f2937;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.amortization-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.amortization-table tbody tr:hover {
    background: #f9fafb;
}

.amortization-table tbody tr:last-child td {
    font-weight: 600;
    color: #3b82f6;
    background: #f0fdf4;
}

/* Comparison Section */
.comparison-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.comparison-section h2 {
    color: #1f2937;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 968px) {
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.comparison-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.comparison-card:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.comparison-card h3 {
    color: #1f2937;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.comparison-value {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-value .monthly {
    font-size: 1.5rem;
    font-weight: 900;
    color: #3b82f6;
}

.comparison-value .total {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Info Section */
.info-section {
    background: white;
    padding: 4rem 0;
}

.info-section h2 {
    text-align: center;
    color: #1f2937;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 968px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.info-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.info-card h3 {
    color: #1f2937;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.info-card ul li {
    padding: 0.5rem 0;
    color: #4b5563;
    display: flex;
    align-items: center;
}

.info-card ul li::before {
    content: "✓";
    color: #3b82f6;
    font-weight: 900;
    margin-right: 0.75rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 4rem 0;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.cta-content p {
    color: white;
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-cta-white {
    background: white;
    color: #3b82f6;
}

.btn-cta-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.btn-cta-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cta-outline:hover {
    background: white;
    color: #3b82f6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-card,
.results-card,
.amortization-section,
.comparison-section {
    animation: fadeIn 0.6s ease-out;
}
