/* ============================================
   Personal Loan EMI Calculator
   ============================================ */

.emi-page {
    --navy: #0a1733;
    --blue: #2156e5;
    --blue-dark: #102a86;
    --donut-loan: #a9c2f5;
    --donut-interest: #0b1a3a;
    --line: #e6e9f2;
    --muted: #8a93a6;
    --ink: #14223f;
    background: #ffffff;
    font-family: "Inter", sans-serif;
}

/* Dark patterned hero band — ONLY the top strip behind the title + top of cards */
.emi-hero {
    background-color: #0a0e27;
    background-image: url('/assets/PersonalLoanEMICalc.webp');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    padding: 120px 24px 170px;
}

.emi-shell {
    max-width: 1300px;
    margin: 0 auto;
}

/* White body; pulled up so the cards overlap into the dark band above */
.emi-body {
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.emi-title {
    color: #fff;
    font-size: 38px;
    font-weight: 500;
    margin: 0 0 28px;
    letter-spacing: -0.5px;
}
.emi-title strong { font-weight: 800; }

/* Two-column layout, pulled up so cards straddle the dark/white edge */
.emi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 28px;
    align-items: start;
    margin-top: -150px; /* pull cards up to overlap the dark band */
}
.emi-main-col { min-width: 0; }

/* ---------- Calculator card ---------- */
.emi-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(10, 23, 51, 0.12);
}
.emi-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.emi-field-label {
    font-size: 13px;
    color: #4a5567;
    margin: 0 0 8px;
}
.emi-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    height: 50px;
    background: #fff;
}
.emi-input-wrap .rupee { color: var(--ink); font-size: 16px; margin-right: 8px; }
.emi-input-wrap input {
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    width: 100%;
    background: transparent;
    font-family: inherit;
}
.emi-input-wrap .suffix { color: var(--muted); font-size: 13px; }

.emi-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 22px;
}
.emi-block { margin-top: 22px; }

/* Range slider */
.emi-slider { margin-top: 14px; }
.emi-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    border-radius: 16px;
    background: #eceff5;
    outline: none;
    cursor: pointer;
}
.emi-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #183FBA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='10 8 6 12 10 16'/%3E%3Cpolyline points='14 8 18 12 14 16'/%3E%3C/svg%3E") center/17px no-repeat;
    box-shadow: 0 0 0 3px #A3C5F1;
    border: none;
}
.emi-slider input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #183FBA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='10 8 6 12 10 16'/%3E%3Cpolyline points='14 8 18 12 14 16'/%3E%3C/svg%3E") center/17px no-repeat;
    box-shadow: 0 0 0 3px #A3C5F1;
    border: none;
    cursor: pointer;
}
.emi-slider-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}
.emi-slider-legend .max { color: var(--blue); font-weight: 700; }

/* ---------- Donut ---------- */
.emi-chart { text-align: center; }
.emi-donut-wrap { position: relative; width: 260px; height: 260px; margin: 0 auto; }
.emi-donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.emi-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.emi-donut-center .label { font-size: 14px; color: #5b6478; }
.emi-donut-center .value { font-size: 20px; font-weight: 800; color: var(--ink); margin-top: 4px; white-space: nowrap; }

.emi-legend {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-top: 22px;
}
.emi-legend-item { font-size: 12px; color: var(--muted); }
.emi-legend-item .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.emi-legend-item .amt { display: block; color: var(--ink); font-weight: 700; font-size: 14px; margin-top: 4px; }
.dot-loan { background: var(--donut-loan); }
.dot-interest { background: var(--donut-interest); }

/* ---------- CTA ---------- */
.emi-eligibility-btn {
    display: block;
    width: 100%;
    margin-top: 32px;
    padding: 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #2a5be0 0%, #102a86 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.emi-eligibility-btn:hover { filter: brightness(1.05); }

/* ---------- Sidebar ---------- */
.emi-sidebar { display: flex; flex-direction: column; gap: 24px; }
.toc-card {
    background: #F8F8F8;
    border-radius: 16px;
    padding: 24px;
    font-family: 'Geist', sans-serif;
}
.toc-card h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 16px -24px; /* pull left so the accent bar sits on the card's left edge */
    padding-left: 20px;
    border-left: 4px solid #065FEC;
    line-height: 1.1;
    font-family: 'Geist', sans-serif;
}
.toc-card ul { list-style: none; margin: 0; padding: 0; }
.toc-card li { margin: 0 0 12px; }
.toc-card a {
    color: #5b6478;
    font-size: 14px;
    font-family: 'Geist', sans-serif;
    text-decoration: none;
    display: block;
}
.toc-card a:hover { color: var(--blue); }

.popular-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
}
.popular-card h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.popular-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
}
.popular-card a:last-child { border-bottom: none; }
.popular-card a:hover { color: var(--blue); }
.popular-card a .arrow { color: var(--ink); }

/* ---------- Content below the calculator ---------- */
.emi-content { padding-top: 40px; padding-bottom: 60px; }
.emi-content p {
    color: #4a5567;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 18px;
}
.emi-content h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    margin: 32px 0 18px;
}
.emi-content img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 16px 0; }
.emi-content ul, .emi-content ol { margin: 0 0 18px; padding-left: 22px; }
.emi-content li { font-size: 15px; line-height: 1.7; color: #4a5567; margin: 0 0 8px; }
.emi-content h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 24px 0 12px; }
.emi-content a { color: var(--blue); text-decoration: none; }
.emi-content strong { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .emi-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .emi-hero { padding: 90px 16px 32px; }
    .emi-title { font-size: 28px; }
    .emi-card { padding: 22px; }
    .emi-card-grid { grid-template-columns: 1fr; gap: 28px; }
    .emi-row-2 { grid-template-columns: 1fr; }
}

/* ---------- Bulleted lists ---------- */
.emi-bullets { margin: 0 0 18px; padding-left: 22px; }
.emi-bullets li { color: #4a5567; font-size: 15px; line-height: 1.7; margin: 0 0 8px; }
.emi-bullets li strong { color: var(--ink); }

/* ---------- Formula block ---------- */
.emi-formula {
    background: #f5f7fb;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
    font-size: 17px;
    color: var(--ink);
    font-weight: 600;
    margin: 0 0 18px;
    overflow-x: auto;
}
.emi-note { font-size: 13px; color: var(--muted); }

/* ---------- Steps ---------- */
.emi-steps { list-style: none; counter-reset: step; margin: 0 0 24px; padding: 0; }
.emi-steps li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}
.emi-steps li span {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef2fc;
    color: var(--blue-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.emi-apply-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, #2a5be0 0%, #102a86 100%);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

/* ---------- Accordion ---------- */
.emi-accordion { margin: 0 0 18px; border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 18px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: inherit;
}
.acc-icon { color: var(--blue); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-item.open .acc-body { max-height: 320px; }
.acc-body p { color: #4a5567; font-size: 14px; line-height: 1.7; margin: 0 0 18px; }

/* ---------- Top Blogs ---------- */
.emi-blogs { padding: 24px 0 70px; }
.emi-blogs > h2 { font-size: 28px; font-weight: 800; color: var(--ink); margin: 0 0 24px; }
.emi-blogs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.emi-blog-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    transition: box-shadow 0.2s;
}
.emi-blog-card:hover { box-shadow: 0 14px 36px rgba(10, 23, 51, 0.12); }
.emi-blog-img { height: 180px; background: linear-gradient(135deg, #c9d6f5, #8aa6e8); background-size: cover; background-position: center; }
.emi-blog-body { padding: 20px; }
.emi-blog-date { font-size: 12px; color: var(--muted); }
.emi-blog-body h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 8px 0 10px; line-height: 1.3; }
.emi-blog-body p { font-size: 14px; color: #4a5567; line-height: 1.6; margin: 0 0 14px; }
.emi-blog-link { color: var(--blue); font-weight: 600; font-size: 14px; }

@media (max-width: 860px) {
    .emi-blogs-grid { grid-template-columns: 1fr; }
}
