/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Light gray background */
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header Styles */
header {
    background-color: #000080; /* Dark blue header */
    color: white;
    padding: 10px 0;
    border-bottom: 5px solid #0000CD; /* Medium blue border */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: #000080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-right: 10px;
    line-height: 1; /* Ensure vertical centering */
}

header .logo span {
    font-size: 1.5em;
    font-weight: bold;
    line-height: 40px; /* Align text with icon */
}

header .language-selector {
    display: flex;
    align-items: center;
}



header .language-selector span {
    font-size: 0.9em;
    line-height: 15px; /* Align text with flag */
    vertical-align: middle; /* Align with flag */
}

/* Main Content Styles */
main {
    padding: 20px 0;
}

main h1 {
    text-align: center;
    color: #000080;
    margin-bottom: 30px;
}

.calculator-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-item .color-box {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.principal-color {
    background-color: #0000CD; /* Medium blue */
}

.interest-color {
    background-color: #4169E1; /* Royal blue */
}

.chart-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #f0f2f5; /* Light gray background for the empty part of the chart */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: #666;
    /* Adjusting proportions to match the image more closely */
    background-image: conic-gradient(#0000CD 70%, #4169E1 0%); /* More accurate donut chart */
    transform: rotate(-90deg); /* Start from top */
    border: none; /* Remove border to use conic-gradient for the donut effect */
    box-shadow: inset 0 0 0 15px #f0f2f5; /* Inner ring color */
}

.calculator-inputs {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.input-group label {
    font-weight: bold;
    flex: 1;
}

.input-field {
    flex: 2;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.input-field span {
    background-color: #000080; /* Darker blue */
    color: white;
    padding: 8px 12px;
    font-weight: bold;
}

.input-field input[type="number"] {
    border: none;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.input-field select {
    border: none;
    padding: 8px;
    background-color: #000080; /* Darker blue */
    color: white;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none; /* Remove default arrow */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234169E1%22%20d%3D%22M287%2C114.7L159.7%2C242c-3.2%2C3.2-8.3%2C3.2-11.5%2C0L5.4%2C114.7c-3.2-3.2-3.2-8.3%2C0-11.5l11.5-11.5c3.2-3.2%2C8.3-3.2%2C11.5%2C0l115.5%2C115.5l115.5-115.5c3.2-3.2%2C8.3-3.2%2C11.5%2C0l11.5%2C11.5C290.2%2C106.4%2C290.2%2C111.5%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow - darker blue */
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px; /* Space for the arrow */
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.slider-group label {
    font-weight: bold;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0000CD;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0000CD;
    cursor: pointer;
}

.slider-value {
    background-color: #000080; /* Darker blue */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

.slider-unit {
    font-size: 0.65em; /* Even smaller font size */
    color: #888; /* Lighter gray */
    text-align: center;
    margin-top: 2px;
}

.emi-result {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.emi-result h2 {
    color: #000080;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: bold;
}

.result-item .value {
    color: #222; /* Darker gray, almost black */
    font-weight: bold;
}

.social-share {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.social-share button {
    background-color: #0000CD;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-share .facebook { background-color: #3b5998; }
.social-share .twitter { background-color: #1da1f2; }
.social-share .email { background-color: #ea4335; }
.social-share .pinterest { background-color: #bd081c; }
.social-share .linkedin { background-color: #0077b5; }
.social-share .whatsapp { background-color: #25d366; }
.social-share .telegram { background-color: #0088cc; }

.info-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.info-section h2 {
    color: #000080;
    margin-bottom: 15px;
}

.info-section p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more-button {
    background-color: #0000CD;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    display: block;
    margin: 20px auto 0 auto;
}

/* Footer Styles */
footer {
    background-color: #000080;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

footer .footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

footer .footer-links a:hover {
    text-decoration: underline;
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
}

.calculator-section{

  display: flex;
  justify-content: center; /* centers horizontally */
  align-items: center;    /* centers vertically */

}

.chart-placeholder{
    font-size: 0;
}
