:root {
    --primary: #1e3a8a; 
    --primary-light: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #475569;
    --border: #e2e8f0;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --success-text: #166534;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; }

/* Header & Footer */
header { background-color: var(--card-bg); box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 16px 20px; position: sticky; top: 0; z-index: 100; }
.header-content { max-width: 900px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 20px; color: var(--primary); text-decoration: none; }
nav a { margin-left: 15px; text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 14px; }
nav a:hover { color: var(--primary-light); }
footer { background-color: #0f172a; color: #94a3b8; padding: 40px 20px; text-align: center; font-size: 14px; margin-top: 60px; }
footer a { color: #94a3b8; text-decoration: none; margin: 0 10px; }
footer a:hover { color: white; }
.footer-links { margin-bottom: 16px; }

/* Layouts */
.container { max-width: 800px; margin: 40px auto; padding: 0 20px; background: var(--card-bg); padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
h1 { font-size: 32px; color: var(--primary); margin-bottom: 20px; }
h2 { font-size: 24px; color: var(--primary); margin: 30px 0 15px; }
h3 { font-size: 18px; margin: 20px 0 10px; }
p { margin-bottom: 15px; color: var(--text-muted); }
ul, ol { margin-bottom: 15px; padding-left: 20px; color: var(--text-muted); }
li { margin-bottom: 8px; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Calculator Specific */
.calculator-container { background-color: var(--card-bg); width: 100%; max-width: 600px; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); padding: 32px; margin: -30px auto 40px; position: relative; z-index: 10; border: 1px solid var(--border); }
.hero { background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%); color: white; padding: 60px 20px 40px; text-align: center; }
.hero h1 { color: white; font-size: 32px; margin-bottom: 16px; }
.hero p { font-size: 18px; color: #e2e8f0; max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.input-wrapper { position: relative; }
.input-wrapper input[type="number"] { width: 100%; padding: 14px 16px; font-size: 16px; border: 2px solid var(--border); border-radius: 8px; background-color: #f8fafc; transition: all 0.2s ease; outline: none; }
.input-wrapper input[type="number"]:focus { border-color: var(--primary-light); background-color: #ffffff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.input-wrapper .currency-symbol { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; }
.toggle-group { background-color: #f1f5f9; border: 1px solid var(--border); padding: 16px; border-radius: 8px; margin-bottom: 24px; }
.toggle-label { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 15px; font-weight: 500; }
.switch { position: relative; display: inline-block; width: 48px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-light); }
input:checked + .slider:before { transform: translateX(24px); }
.insurance-input { margin-top: 16px; display: none; }
.btn-calculate { width: 100%; padding: 16px; background-color: var(--primary-light); color: white; border: none; border-radius: 8px; font-size: 18px; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease; margin-bottom: 24px; }
.btn-calculate:hover { background-color: var(--primary-hover); }
.results-box { background-color: var(--success-bg); border: 1px solid var(--success-border); border-radius: 8px; padding: 20px; display: none; opacity: 0; transition: opacity 0.4s ease; }
.results-box.active { display: block; opacity: 1; }
.result-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.result-row.total { border-top: 1px solid var(--success-border); padding-top: 12px; margin-top: 12px; font-weight: 700; font-size: 18px; color: var(--success-text); }
.insurance-result { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--success-border); display: none; }
.insurance-result .result-row { color: #b91c1c; font-weight: 700; }

@media (max-width: 600px) {
    .hero h1 { font-size: 26px; }
    .calculator-container { padding: 24px; margin: -20px 16px 40px; }
    .container { padding: 24px; margin: 20px 16px; }
    nav { display: none; } /* Hide nav on mobile for simplicity */
}