/*==========================================================================
  Finance page (finance.html) - sections added from the site review:
  hero button, What We Do / Don't, government schemes table, eligibility &
  documents table, How It Works, EMI calculator. Section headings reuse the
  shared .svc-sol-title / .svc-sol-intro styles from service-detail.css.
==========================================================================*/

/* ---------- Hero: "Talk to our finance lead" ---------- */
.page-finance .fin-hero-btn {
    position: relative;
    z-index: 9;
    display: inline-block;
    margin: 0 0 22px;
    background-color: var(--theme-color);
}

/* the enquiry card is the anchor target; keep it clear of the sticky header */
.page-finance #finance-enquiry {
    scroll-margin-top: 120px;
}

/* ---------- What we do / what we don't ---------- */
.page-finance .fin-scope-section {
    padding-top: 0;
}

.fin-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    margin-top: 36px;
}

.fin-scope-card {
    padding: 32px 32px 28px;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid rgba(32, 64, 102, 0.12);
    box-shadow: 0 10px 30px rgba(32, 64, 102, 0.06);
}

.fin-scope-card--do {
    border-top: 4px solid var(--theme-color);
}

.fin-scope-card--dont {
    border-top: 4px solid #d9534f;
}

.fin-scope-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 18px;
}

.fin-scope-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--white);
}

.fin-scope-card--do .fin-scope-icon { background: var(--theme-color); }
.fin-scope-card--dont .fin-scope-icon { background: #d9534f; }

.fin-scope-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fin-scope-card li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.fin-scope-card li:last-child { margin-bottom: 0; }

.fin-scope-card li::before {
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 1px;
}

.fin-scope-card--do li::before { content: "\f00c"; color: var(--theme-color); }
.fin-scope-card--dont li::before { content: "\f00d"; color: #d9534f; }

/* ---------- Comparison tables (schemes, documents) ---------- */
.page-finance .fin-schemes-section {
    background: #eef5f5;
}

.fin-table-wrap {
    margin-top: 36px;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(32, 64, 102, 0.12);
    background: var(--white);
    box-shadow: 0 10px 30px rgba(32, 64, 102, 0.06);
}

.fin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}

.fin-table th,
.fin-table td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(32, 64, 102, 0.1);
}

.fin-table tbody tr:last-child th,
.fin-table tbody tr:last-child td {
    border-bottom: 0;
}

.fin-table thead th {
    background: var(--theme-color-2);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
}

.fin-table thead th i {
    margin-right: 6px;
    color: #7fd6a6;
}

.fin-table tbody th {
    width: 18%;
    font-weight: 600;
    color: var(--header);
    background: #f7fafa;
}

.fin-table tbody td {
    color: var(--text);
}

.fin-table tbody tr:nth-child(even) td {
    background: #fbfdfd;
}

.fin-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 900px;
    margin: 18px auto 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    text-align: center;
    justify-content: center;
}

.fin-note i {
    margin-top: 4px;
    color: var(--theme-color);
}

/* ---------- How it works ---------- */
.page-finance .fin-how-section {
    background: #eef5f5;
}

.fin-how-steps {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

/* connector behind the numbers */
.fin-how-steps::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 12.5%;
    right: 12.5%;
    border-top: 2px dashed rgba(0, 152, 74, 0.4);
}

.fin-how-steps li {
    position: relative;
    text-align: center;
    padding: 0 8px;
}

.fin-how-num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--theme-color);
    color: var(--white);
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 0 0 8px #eef5f5, 0 10px 24px rgba(0, 152, 74, 0.3);
    margin-bottom: 20px;
}

.fin-how-steps h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.fin-how-steps p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.fin-how-time {
    display: table;
    margin: 40px auto 0;
    padding: 12px 24px;
    border-radius: 50px;
    background: var(--white);
    color: var(--header);
    font-size: 16px;
    box-shadow: 0 6px 18px rgba(32, 64, 102, 0.08);
}

.fin-how-time i {
    color: var(--theme-color);
    margin-right: 6px;
}

/* ---------- EMI calculator ---------- */
.fin-calc {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    max-width: 1000px;
    margin: 36px auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(32, 64, 102, 0.12);
}

.fin-calc-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    padding: 36px;
    background: var(--white);
    border: 1px solid rgba(32, 64, 102, 0.12);
    border-right: 0;
    border-radius: 16px 0 0 16px;
    align-content: center;
}

.fin-calc-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--header);
    margin-bottom: 8px;
}

.fin-calc-field input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(32, 64, 102, 0.2);
    border-radius: 8px;
    font-size: 16px;
    color: var(--header);
    background: #f7fafa;
    outline: none;
}

.fin-calc-field input:focus {
    border-color: var(--theme-color);
    background: var(--white);
}

.fin-calc-result {
    padding: 36px;
    color: var(--white);
    background-color: #0b1f38;
    background-image:
        radial-gradient(circle at 90% 10%, rgba(0, 152, 74, 0.35) 0%, rgba(0, 152, 74, 0) 50%),
        linear-gradient(135deg, #0b1f38 0%, #1b3a5e 70%, #0f4a36 100%);
}

.fin-calc-label {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.fin-calc-emi {
    margin: 0 0 22px;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--white);
}

.fin-calc-breakdown {
    margin: 0 0 24px;
    padding: 0;
}

.fin-calc-breakdown div {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.fin-calc-breakdown dt {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.fin-calc-breakdown dd {
    margin: 0;
    font-weight: 600;
    color: var(--white);
}

.fin-calc-range {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.fin-calc-range li {
    flex: 1 1 0;
    text-align: center;
    padding: 10px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.fin-calc-range li.is-current {
    background: var(--theme-color);
    border-color: var(--theme-color);
}

.fin-calc-range span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.fin-calc-range strong {
    display: block;
    font-size: 15px;
    color: var(--white);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .fin-scope-grid { grid-template-columns: 1fr; }
    .fin-how-steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
    .fin-how-steps::before { display: none; }
    .fin-calc { grid-template-columns: 1fr; }
    .fin-calc-inputs { border-right: 1px solid rgba(32, 64, 102, 0.12); border-bottom: 0; border-radius: 16px 16px 0 0; }
}

@media (max-width: 575px) {
    .fin-scope-card { padding: 26px 22px 22px; }
    .fin-how-steps { grid-template-columns: 1fr; }
    .fin-calc-inputs { grid-template-columns: 1fr; padding: 26px 22px; }
    .fin-calc-result { padding: 26px 22px; }
    .fin-calc-emi { font-size: 34px; }
    .fin-table th, .fin-table td { padding: 14px 16px; }
}

/* ---------- CA profile: LinkedIn link (sits on the navy band) ---------- */
.page-finance .fin-partner-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 9px 18px 9px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    transition: background-color .3s ease, border-color .3s ease;
}

.page-finance .fin-partner-linkedin i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0a66c2;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.page-finance .fin-partner-linkedin:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
}

/* ---------- Loan / "What We Prepare" card grids ----------
   service-detail.css centres the last card on its own row below 1200px, which
   suits an odd count. Both lists here are even (10 and 6 cards), so the last
   card stays in the grid instead of dropping onto a row by itself. */
@media (max-width: 1199px) {
    .page-finance .svc-sol-row:last-child:nth-child(even) {
        grid-column: auto;
        justify-self: stretch;
        width: auto;
    }
}

/* Desktop: service-detail.css moves the last card to the middle column, which
   centres the 10th loan card (3+3+3+1). When the last card already completes a
   row of three (the 6-card "What We Prepare" list), it keeps its own place so
   the list reads 3+3 instead of 3+2+1. */
@media (min-width: 1200px) {
    .page-service-detail.page-finance .svc-sol-list .svc-sol-row:last-child:nth-child(3n) {
        grid-column: auto;
    }
}

/* ---------- Schemes / Eligibility tabs ---------- */
.fin-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin: 32px auto 0;
    padding: 6px;
    border-radius: 50px;
    background: var(--white);
    border: 1px solid rgba(32, 64, 102, 0.12);
    box-shadow: 0 8px 22px rgba(32, 64, 102, 0.08);
}

.fin-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 0;
    border-radius: 50px;
    background: transparent;
    color: var(--theme-color-2);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease;
}

.fin-tab i {
    color: var(--theme-color);
    transition: color .25s ease;
}

.fin-tab:hover {
    color: var(--theme-color);
}

.fin-tab.is-active {
    background: var(--theme-color);
    color: var(--white);
}

.fin-tab.is-active i {
    color: var(--white);
}

.fin-tab:focus-visible,
.fin-tab-panel:focus-visible {
    outline: 2px solid var(--theme-color-2);
    outline-offset: 3px;
}

.fin-tab-panel {
    margin-top: 30px;
    animation: finTabIn .35s ease;
}

.fin-tab-panel[hidden] {
    display: none;
}

/* the intro now sits under the tabs, not the heading */
.page-finance .fin-tab-panel > .svc-sol-intro {
    margin-bottom: 0;
}

.page-finance .fin-tab-panel .fin-table-wrap {
    margin-top: 26px;
}

@keyframes finTabIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fin-tab-panel { animation: none; }
}

@media (max-width: 575px) {
    .fin-tabs { border-radius: 16px; }
    .fin-tab { flex: 1 1 100%; justify-content: center; padding: 12px 16px; font-size: 15px; }
}

/* ---------- Alternating backgrounds (Loan Solutions down to the blogs) ----------
   Healthcare Loan Solutions (white) -> What We Prepare (tint) -> Schemes tabs
   (white) -> How It Works (tint) -> EMI Calculator (white) -> Strategic
   Solutions (tint) -> FAQs (white) -> Our Blogs (tint) -> CTA band.
   .svc-sol-section is tinted by default in service-detail.css, so What We
   Prepare and Strategic take the tint without a rule; the FAQ's .svc-bg-tint
   is white by default. */

/* What We Prepare: tint section, so its cards go white to stand off it */
.page-service-detail.page-finance .fin-prepare-section .svc-sol-row {
    background: var(--white);
    border-color: rgba(32, 64, 102, .09);
    box-shadow: 0 8px 26px rgba(32, 64, 102, .07);
}

/* Schemes tabs: white (was tint) */
.page-finance .fin-schemes-section {
    background: var(--white);
}

/* How It Works: tint; node rings match the tint, timeline pill is white */
.page-finance .fin-how-section {
    background: #eef5f5;
}

.page-finance .fin-how-num {
    box-shadow: 0 0 0 8px #eef5f5, 0 10px 24px rgba(0, 152, 74, 0.3);
}

.page-finance .fin-how-time {
    background: var(--white);
    box-shadow: 0 6px 18px rgba(32, 64, 102, 0.08);
}

/* EMI Calculator: white */
.page-finance .fin-calc-section {
    background: var(--white);
}

/* Our Blogs: tint */
.page-service-detail.page-finance .svc-blogs-section {
    background-color: #eef5f5;
}

/* ---------- What We Prepare: "your loan file" layout ----------
   Left: eyebrow, left-aligned heading, lead and a decorative stack of file
   pages. Right: the six deliverables as numbered checklist cards. Sits on the
   tinted .svc-sol-section background. */
.fprep {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 60px;
    align-items: center;
}

.fprep-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(0, 152, 74, 0.12);
    color: var(--theme-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-service-detail .fprep .fprep-title {
    text-align: left;
    margin-bottom: 16px;
}

.fprep-lead {
    margin: 0;
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
}

/* decorative file stack */
.fprep-stack {
    position: relative;
    height: 250px;
    max-width: 380px;
    margin-top: 40px;
}

.fprep-page {
    position: absolute;
    left: 0;
    right: 40px;
    top: 30px;
    height: 200px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid rgba(32, 64, 102, 0.1);
    box-shadow: 0 14px 34px rgba(32, 64, 102, 0.12);
}

/* back pages sit higher than the front one so their tabs clear it */
.fprep-page--3 { transform: translate(44px, -40px) rotate(5deg); opacity: .8; }
.fprep-page--2 { transform: translate(22px, -22px) rotate(2.5deg); opacity: .92; }
.fprep-page--1 { transform: none; padding: 30px 24px 24px; }

.fprep-tab {
    position: absolute;
    top: -14px;
    left: 20px;
    padding: 5px 12px;
    border-radius: 8px 8px 0 0;
    background: var(--theme-color-2);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
}

.fprep-page--2 .fprep-tab { left: auto; right: 90px; background: #2f5a86; }
.fprep-page--3 .fprep-tab { left: auto; right: 14px; background: #4a78a6; }

.fprep-lines {
    display: block;
}

.fprep-lines i {
    display: block;
    height: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: #e6eef0;
}

.fprep-lines i:nth-child(1) { width: 70%; background: #d4e4e8; }
.fprep-lines i:nth-child(2) { width: 92%; }
.fprep-lines i:nth-child(3) { width: 84%; }
.fprep-lines i:nth-child(4) { width: 58%; }

.fprep-stamp {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 50px;
    background: var(--theme-color);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(0, 152, 74, 0.3);
}

/* the six deliverables */
.fprep-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.fprep-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 22px 22px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid rgba(32, 64, 102, 0.1);
    box-shadow: 0 8px 22px rgba(32, 64, 102, 0.06);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.fprep-num {
    position: absolute;
    top: 20px;
    right: 56px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(32, 64, 102, 0.35);
}

.fprep-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 152, 74, 0.1);
    color: var(--theme-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background-color .3s ease, color .3s ease;
}

.fprep-tick {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(0, 152, 74, 0.35);
    color: rgba(0, 152, 74, 0.55);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.fprep-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
    color: var(--header);
}

.fprep-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
}

@media (hover: hover) {
    .fprep-item:hover {
        transform: translateY(-4px);
        border-color: var(--theme-color);
        box-shadow: 0 16px 34px rgba(32, 64, 102, 0.12);
    }

    .fprep-item:hover .fprep-icon {
        background: var(--theme-color);
        color: var(--white);
    }

    .fprep-item:hover .fprep-tick {
        background: var(--theme-color);
        border-color: var(--theme-color);
        color: var(--white);
    }
}

@media (max-width: 1199px) {
    .fprep { grid-template-columns: 1fr; gap: 40px; }
    .fprep-intro { text-align: center; }
    .page-service-detail .fprep .fprep-title { text-align: center; }
    .fprep-lead { max-width: 680px; margin: 0 auto; }
    .fprep-stack { display: none; }
}

@media (max-width: 575px) {
    .fprep-list { grid-template-columns: 1fr; }
    .fprep-item { padding: 22px 18px 20px; }
}

/* ---------- What We Prepare: sticky intro + scrolling list (desktop) ----------
   The intro stays in view while the page scrolls past the section; the list is
   capped (by the script) to its first four cards and scrolls for the rest. A
   fade and a "Scroll for more" hint show until the end is reached. Below
   1200px the layout stacks and every card shows. */
.fprep {
    align-items: start;
}

.fprep-intro {
    position: sticky;
    top: 120px;
}

.fprep-listwrap {
    position: relative;
}

.fprep-hint {
    display: none;
}

.fprep-listwrap.is-scroll .fprep-list {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 12px 4px 4px;
    margin-right: -12px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 152, 74, 0.45) transparent;
}

.fprep-listwrap.is-scroll .fprep-list::-webkit-scrollbar {
    width: 6px;
}

.fprep-listwrap.is-scroll .fprep-list::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: rgba(0, 152, 74, 0.45);
}

/* fade over the bottom edge while there is more to scroll */
.fprep-listwrap.is-scroll::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    background: linear-gradient(180deg, rgba(238, 245, 245, 0) 0%, #eef5f5 90%);
    pointer-events: none;
    transition: opacity .3s ease;
}

.fprep-listwrap.is-scroll .fprep-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color);
    transition: opacity .3s ease;
}

.fprep-listwrap.is-scroll .fprep-hint i {
    animation: fprepNudge 1.6s ease-in-out infinite;
}

/* once the end is reached, drop the fade and the hint */
.fprep-listwrap.is-end::after,
.fprep-listwrap.is-end .fprep-hint {
    opacity: 0;
}

.fprep-listwrap.is-scroll .fprep-list:focus-visible {
    outline: 2px solid var(--theme-color-2);
    outline-offset: 4px;
    border-radius: 14px;
}

@keyframes fprepNudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .fprep-listwrap.is-scroll .fprep-hint i { animation: none; }
    .fprep-listwrap.is-scroll .fprep-list { scroll-behavior: auto; }
}

@media (max-width: 1199px) {
    .fprep-intro { position: static; }
}

/* the cards' offsetTop is measured from the list itself */
.fprep-list {
    position: relative;
}

/* keep the fade over the cards only, not over the "Scroll for more" hint below */
.fprep-listwrap.is-scroll::after {
    bottom: 34px;
    height: 60px;
}
