/* Monthly Payment Calculator Specific Styles */

/* Results Section */
.results-section {
    animation: fadeInUp 0.6s ease-out;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 30px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.result-item.highlight {
    background: linear-gradient(135deg, #204080 0%, #1a3366 100%);
    color: white;
    grid-column: 1 / -1;
}

.result-item.highlight:hover {
    background: linear-gradient(135deg, #1a3366 0%, #142a5c 100%);
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 64, 128, 0.1);
    flex-shrink: 0;
}

.result-item.highlight .result-icon {
    background: rgba(255, 255, 255, 0.2);
}

.result-icon i {
    font-size: 20px;
    color: #204080;
}

.result-item.highlight .result-icon i {
    color: white;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.result-item.highlight .result-label {
    color: rgba(255, 255, 255, 0.8);
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.result-item.highlight .result-value {
    color: white;
}

/* Payment Breakdown Section */
.breakdown-section {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9ff;
    border-radius: 15px;
    border: 1px solid rgba(32, 64, 128, 0.1);
}

.breakdown-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breakdown-section h3 i {
    color: #204080;
}

.payment-breakdown {
    margin-top: 20px;
}

.breakdown-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.breakdown-visual {
    margin-bottom: 20px;
}

.breakdown-bar {
    display: flex;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.principal-portion {
    background: linear-gradient(135deg, #204080, #1a3366);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.interest-portion {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.breakdown-note {
    text-align: center;
}

.breakdown-note p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.chip {
    background: #f8f9ff;
    color: #204080;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(32, 64, 128, 0.2);
    transition: all 0.2s ease;
}

.chip:hover {
    background: #204080;
    color: white;
    transform: translateY(-1px);
}

.chip.active {
    background: #204080;
    color: white;
}

/* Loading Animation */
.calculating {
    opacity: 0.6;
    pointer-events: none;
}

.calculating .calculate-btn {
    background: #ccc;
    cursor: not-allowed;
}

.calculating .calculate-btn i {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .result-item.highlight {
        grid-column: 1;
    }

    .result-value {
        font-size: 20px;
    }

    .breakdown-bar {
        height: 50px;
    }

    .principal-portion,
    .interest-portion {
        font-size: 14px;
    }

    .breakdown-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .result-item {
        padding: 15px;
    }

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

    .result-icon i {
        font-size: 16px;
    }

    .result-value {
        font-size: 18px;
    }

    .breakdown-bar {
        height: 40px;
        flex-direction: column;
    }

    .principal-portion,
    .interest-portion {
        font-size: 12px;
        height: 50%;
    }

    .suggestion-chips {
        justify-content: center;
    }

    .chip {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Animation for results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .breakdown-bar {
        border: 2px solid #333;
        background: white !important;
    }

    .principal-portion {
        background: #f0f0f0 !important;
        color: #333 !important;
        border-right: 1px solid #333;
    }

    .interest-portion {
        background: #e0e0e0 !important;
        color: #333 !important;
    }

    .suggestion-chips {
        display: none;
    }
}

/* Enhanced visual feedback */
.result-item:hover .result-icon {
    transform: scale(1.1);
}

.breakdown-bar:hover .principal-portion,
.breakdown-bar:hover .interest-portion {
    filter: brightness(1.1);
}

/* Accessibility improvements */
.result-item:focus-within {
    outline: 2px solid #204080;
    outline-offset: 2px;
}

.chip:focus {
    outline: 2px solid #204080;
    outline-offset: 2px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .breakdown-note p {
        color: #999;
    }
    
    .breakdown-item {
        background: #2a2a2a;
        color: white;
    }
}

/* Info Section Styles */
.info-section {
    margin: 60px 0;
    padding: 50px 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.info-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.info-section h2 i {
    color: #204080;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 30px;
}

.info-card {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(32, 64, 128, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(32, 64, 128, 0.15);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: #204080;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.info-icon i {
    font-size: 24px;
    color: white;
}

.info-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.info-card p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
}

/* Factors Section */
.factors-section {
    margin: 60px 0;
    padding: 50px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 20px;
}

.factors-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.factors-section h2 i {
    color: #204080;
}

.factors-timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
}

.factors-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #204080, #1a3366);
}

.factor-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.factor-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #204080, #1a3366);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.factor-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-left: 20px;
    flex: 1;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(32, 64, 128, 0.1);
}

.factor-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.factor-content p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
}

/* Strategies Section */
.strategies-section {
    margin: 60px 0;
    padding: 50px 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.strategies-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.strategies-section h2 i {
    color: #204080;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 30px;
}

.strategy-card {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(32, 64, 128, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(32, 64, 128, 0.15);
}

.strategy-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #204080, #1a3366);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.strategy-icon i {
    font-size: 28px;
    color: white;
}

.strategy-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.strategy-card p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 20px;
}

.strategy-tip {
    background: rgba(32, 64, 128, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #204080;
    text-align: left;
}

.strategy-tip strong {
    color: #204080;
    font-weight: 600;
}

/* FAQ Section */
.faq-section {
    margin: 60px 0;
    padding: 50px 0;
    background: #f8f9fa;
    border-radius: 20px;
}

.faq-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.faq-section h2 i {
    color: #204080;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(32, 64, 128, 0.05);
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.faq-question i {
    color: #204080;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 25px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
}

/* Responsive adjustments for new content */
@media (max-width: 768px) {
    .factors-timeline::before {
        left: 30px;
    }

    .factor-item {
        padding-left: 0;
    }

    .factor-number {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .factor-content {
        margin-left: 15px;
        padding: 20px;
    }

    .strategies-grid {
        grid-template-columns: 1fr;
    }

    .strategy-icon {
        width: 60px;
        height: 60px;
    }

    .strategy-icon i {
        font-size: 24px;
    }
}
