/* Cost Estimator Page Styles */
.page-header {
    background: linear-gradient(rgba(82, 80, 91, 0.9), rgba(82, 80, 91, 0.9)), 
                url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') 
                no-repeat center center/cover;
    height: 300px;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 70px;
    animation: fadeIn 0.8s ease-in-out;
}

.calculator-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

.calculator-form {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background: white;
}

.calculator-form h2 {
    color: #52505B;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #52505B;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #52505B;
    box-shadow: 0 0 0 2px rgba(82, 80, 91, 0.2);
}

/* Custom Rate Input Styles */
#custom-rate-container {
    margin-top: 10px;
    display: none;
}

#custom-rate-container label {
    display: block;
    margin-bottom: 8px;
    color: #52505B;
    font-weight: 500;
}

#custom-rate {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#custom-rate:focus {
    outline: none;
    border-color: #52505B;
    box-shadow: 0 0 0 2px rgba(82, 80, 91, 0.2);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #52505B;
    color: white;
}

.btn-primary:hover {
    background-color: #3e3d44;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #52505B;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.results-container {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background: #f9f9f9;
    border-left: 1px solid #eee;
}

.cost-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.cost-summary h3 {
    color: #52505B;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-item.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #52505B;
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-container {
    height: 300px;
    margin-top: 30px;
}

.cost-breakdown {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.cost-breakdown h3 {
    color: #52505B;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.breakdown-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #52505B;
    transition: transform 0.3s, box-shadow 0.3s;
}

.breakdown-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.breakdown-item h4 {
    margin: 0 0 8px 0;
    color: #52505B;
    font-size: 1rem;
}

.breakdown-amount {
    font-weight: 600;
    color: #333;
}

.breakdown-percentage {
    display: inline-block;
    background: rgba(82, 80, 91, 0.1);
    color: #52505B;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .results-container {
        border-left: none;
        border-top: 1px solid #eee;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculator-form,
    .results-container {
        padding: 20px 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
