/* public/css/style.css (চূড়ান্ত এবং সম্পূর্ণ সংস্করণ) */

/* === Color Palette === */
:root {
    --primary-color: #0d6efd; /* Bootstrap Primary Blue */
    --secondary-color: #6c757d;
    --background-color: #f8f9fa; /* Light Gray */
    --card-bg-color: #ffffff;
    --text-color: #343a40;
    --heading-color: #212529;
    --accent-color: #198754; /* Bootstrap Success Green */
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* === General Body Styles === */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* === Header / Navbar === */
.site-header {
    background: linear-gradient(90deg, #0052D4, #4364F7, #6FB1FC);
    padding: 10px 0;
    box-shadow: 0 4px 12px var(--shadow-color);
}
.site-header .navbar-brand {
    font-size: 1.8rem;
    font-weight: 300;
}
.site-header .navbar-brand strong {
    font-weight: 600;
}

/* === Hero Section (Homepage) === */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--card-bg-color);
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px var(--shadow-color);
}
.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--heading-color);
}
.hero-section p {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* === Calculator Card (Homepage) === */
.calculator-card {
    background-color: var(--card-bg-color);
    border: none;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.calculator-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.calculator-card .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 15px;
}
.calculator-card .card-text {
    color: var(--secondary-color);
    min-height: 50px;
}

/* === Form Card (Calculator Pages) === */
.form-card {
    background-color: var(--card-bg-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--shadow-color);
}
.form-card h3 {
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}
.form-control {
    border-radius: 8px;
    padding: 12px;
}
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: var(--primary-color);
}

/* === Custom Button === */
.btn-custom {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
}
.btn-custom:hover {
    background-color: #0b5ed7; /* Darker blue */
    color: white;
}

/* === Result Box for Profit/Success === */
.result-box {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid var(--accent-color);
    margin-top: 30px;
    text-align: center;
}
.result-box h4 { margin: 0; font-size: 1.8rem; font-weight: 600; }
.result-box strong { font-size: 2.2rem; }

/* === Result Box for Loss === */
.result-box-loss {
    background-color: #fdecea;
    color: #b71c1c;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #d32f2f;
    margin-top: 30px;
    text-align: center;
}
.result-box-loss h4 { margin: 0; font-size: 1.8rem; font-weight: 600; }
.result-box-loss strong { font-size: 2.2rem; }

/* === Financial Analysis Summary Cards === */
.summary-card {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: center;
}
.summary-card .label { font-size: 1rem; color: var(--secondary-color); margin-bottom: 5px; }
.summary-card .value { font-size: 2.2rem; font-weight: 700; }
.summary-card .value.profit { color: var(--accent-color); }
.summary-card .value.loss { color: #d32f2f; }

/* === Chart Customization === */
.chart-container { background-color: #1e1e1e; padding: 25px; border-radius: 15px; margin-top: 20px; }
.chart-container canvas { max-height: 400px; }
.chart-title { text-align: center; color: #f0f0f0; font-weight: 500; margin-bottom: 20px; }

/* === Custom Legend for Pie Chart === */
.custom-legend { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 20px; padding: 0; list-style-type: none; }
.legend-item { display: flex; align-items: center; margin: 5px 15px; font-size: 0.9rem; color: #ccc; }
.legend-color-box { width: 15px; height: 15px; margin-right: 8px; border-radius: 3px; }

/* === Highlight Box for Scenarios === */
.highlight-box { background-color: #e7f3ff; border-left: 5px solid var(--primary-color); padding: 30px; border-radius: 15px; margin-top: 50px; }

/* === EMI Calculator & Interactive Styles === */
.slider-container { margin-bottom: 2rem; }
.input-group-text { min-width: 80px; justify-content: center; }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 8px; background: #e9ecef; border-radius: 5px; outline: none; opacity: 0.9; transition: opacity .2s; }
input[type="range"]:hover { opacity: 1; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: var(--primary-color); cursor: pointer; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 5px rgba(0,0,0,0.2); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: var(--primary-color); cursor: pointer; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 5px rgba(0,0,0,0.2); }
.emi-result-display { text-align: center; margin-bottom: 2rem; }
.emi-result-display .label { font-size: 1.2rem; color: var(--secondary-color); }
.emi-result-display .amount { font-size: 3.5rem; font-weight: 700; color: var(--primary-color); }
.emi-summary-card { background-color: var(--background-color); padding: 1.5rem; border-radius: 12px; }
.summary-item { display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; margin-bottom: 1rem; }
.summary-item .label { color: var(--secondary-color); }
.summary-item .value { font-weight: 600; }
.summary-item .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 8px; }

/* === Accordion Styles for Info Section === */
.info-accordion { margin-top: 60px; border-top: 1px solid #dee2e6; padding-top: 40px; }
.info-accordion .accordion-item { border: 1px solid #dee2e6; border-radius: 10px !important; margin-bottom: 1rem; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; }
.info-accordion .accordion-header .accordion-button { font-weight: 600; font-size: 1.2rem; background-color: #f8f9fa; }
.info-accordion .accordion-button:focus { box-shadow: none; border-color: rgba(0,0,0,.125); }
.info-accordion .accordion-button:not(.collapsed) { background-color: var(--primary-color); color: white; }
.info-accordion .accordion-button:not(.collapsed)::after { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); }
.info-accordion .accordion-body { line-height: 1.7; }

/* === Media Query for Mobile Devices === */
@media (max-width: 767px) {
    .hero-section h1 { font-size: 2.2rem; }
    .summary-card .value { font-size: 1.8rem; }
}

/* === Footer === */
.site-footer { background-color: #343a40; color: rgba(255, 255, 255, 0.7); padding: 20px 0; margin-top: 50px; }
.site-footer p { margin: 0; }