/* Mortgage Calculator Tool Specific Styles */

/* Tool Header */
.tool-header {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    margin-top: 70px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.tool-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.tool-header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fbbf24;
    backdrop-filter: blur(10px);
}

.tool-header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.tool-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tool-features .feature {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-features .feature i {
    color: #fbbf24;
}

/* Mortgage Tool Section */
.mortgage-tool {
    padding: 80px 0;
    background: #f8fafc;
}

/* Mortgage Calculator Form */
.mortgage-calculator-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.calculator-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.calculator-header p {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Calculator Form */
.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Input Groups */
.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: #94a3b8;
}

.input-group small {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: block;
}

/* Calculate Button */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    grid-column: 1 / -1;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Mortgage Results */
.mortgage-results {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.results-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-card.total {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
}

.result-card.total h4,
.result-card.total p {
    color: white;
}

.result-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.result-card.total .result-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.result-content h4 {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.result-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.result-card.total .result-content h4 {
    color: rgba(255, 255, 255, 0.8);
}

.result-card.total .result-content p {
    color: white;
}

/* Loan Details */
.loan-details {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.loan-details h4 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    color: #64748b;
    font-weight: 500;
}

.detail-row span:last-child {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Examples Section */
.examples-section {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.examples-section h3 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.example-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.example-card h4 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.example-card p {
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.example-card p:last-child {
    margin-bottom: 0;
}

/* Action Buttons */
.action-buttons {
    background: white;
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #64748b;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-btn.secondary:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: #3b82f6;
}

.action-btn.primary:hover {
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header {
        padding: 80px 0 60px;
        margin-top: 60px;
    }
    
    .tool-header-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .tool-header-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .tool-header-text h1 {
        font-size: 2rem;
    }
    
    .tool-header-text p {
        font-size: 1rem;
    }
    
    .tool-features {
        gap: 0.75rem;
    }
    
    .tool-features .feature {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .mortgage-tool {
        padding: 60px 0;
    }
    
    .mortgage-calculator-form,
    .mortgage-results,
    .examples-section {
        padding: 2rem;
        margin: 0 1rem 2rem 1rem;
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 60px 0 40px;
    }
    
    .tool-header-content {
        gap: 1rem;
        padding: 0 0.75rem;
    }
    
    .tool-header-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .tool-header-text h1 {
        font-size: 1.8rem;
    }
    
    .tool-header-text p {
        font-size: 0.9rem;
    }
    
    .tool-features {
        flex-direction: column;
        align-items: center;
    }
    
    .mortgage-calculator-form,
    .mortgage-results,
    .examples-section {
        padding: 1.5rem;
        margin: 0 0.75rem 1.5rem 0.75rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
