* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body,
html {
    height: 100%;
}

.top-banner,
.bottom-banner {
    min-height: 90px;
    max-height: 250px;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ad-space {
    background: #ddd;
    color: #333;
    border: 1px dashed #888;
    width: 95%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0066cc;
    color: #fff;
    padding: 10px 20px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    transition: color .3s;
}

.nav-links a:hover {
    color: #010056;
}

.hamburger {
    display: none;
    font-size: 22px;
    cursor: pointer;
}

.main-container {
    display: flex;
    min-height: 66vh;
}

.left-banner {
    min-width: 160px;
    max-width: 300px;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    flex-shrink: 0;
}

.emi-tool-section {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 24px 24px;
    background: linear-gradient(120deg, #e3f2fd 0%, #f5f5f5 100%);
}

.emi-card {
    background: none;
    padding: 0;
    max-width: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.emi-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    position: relative;
    flex-wrap: wrap;
}

.emi-title {
    color: #0066cc;
    font-size: 2.15rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.emi-info-trigger {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #0066cc;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e3f2fd 70%);
    color: #0066cc;
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: transform .35s cubic-bezier(.42, 0, .58, 1), box-shadow .35s, background .4s;
}

.emi-info-trigger:hover,
.emi-info-trigger:focus-visible {
    transform: translateY(-3px) scale(1.07);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    outline: none;
}

.emi-info-trigger:active {
    transform: scale(.95);
}

.emi-info-flyout {
    position: absolute;
    top: 56px;
    left: 0;
    z-index: 50;
    background: #ffffffee;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #c5d8e6;
    border-radius: 18px;
    padding: 18px 20px 16px;
    width: min(600px, 85vw);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.98);
    transition: opacity .55s cubic-bezier(.42, 0, .58, 1), transform .55s cubic-bezier(.42, 0, .58, 1);
}

.emi-info-flyout h2 {
    font-size: 1.2rem;
    color: #0066cc;
    margin-bottom: 6px;
}

.emi-info-flyout p {
    font-size: .94rem;
    color: #222;
    line-height: 1.35;
    margin-bottom: 10px;
}

.emi-info-flyout ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    font-size: .8rem;
    display: grid;
    gap: 4px;
}

.emi-info-flyout .emi-disclaimer {
    font-size: .62rem;
    letter-spacing: .6px;
    color: #555;
    text-transform: uppercase;
    opacity: .9;
}

.emi-title-row:hover .emi-info-flyout,
.emi-info-trigger:focus+.emi-info-flyout,
.emi-info-trigger:focus-visible+.emi-info-flyout {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.emi-interaction-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
}

@media (min-width:1001px) {
    .emi-interaction-row {
        flex-wrap: nowrap;
    }
}

.emi-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #e3f2fd;
    border-radius: 16px;
    padding: 20px 18px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.emi-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.emi-form label {
    font-size: .95rem;
    font-weight: 500;
    color: #333;
}

.emi-form .input-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.emi-form input[type=number] {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid #b0bec5;
    background: #f7fafd;
    font-size: 1rem;
    color: #222;
    transition: border .3s;
}

.emi-form input[type=number]:focus {
    border: 1.5px solid #0066cc;
    outline: none;
}

.emi-form select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1.5px solid #b0bec5;
    background: #e3f2fd;
    color: #222;
    font-size: .95rem;
    transition: border .3s;
}

.emi-form select:focus {
    border: 1.5px solid #0066cc;
    outline: none;
}

.emi-inline-note {
    font-size: .65rem;
    color: #444;
    letter-spacing: .4px;
    margin-top: -4px;
}

.emi-btn {
    margin-top: 4px;
    padding: 11px 0;
    background: linear-gradient(90deg, #0066cc 55%, #333 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    transition: background .35s, transform .25s;
}

.emi-btn:hover {
    background: linear-gradient(90deg, #004b99 55%, #111 100%);
    transform: translateY(-2px) scale(1.03);
}

.emi-btn:active {
    transform: scale(.95);
}

.emi-result-container {
    width: 100%;
    background: linear-gradient(140deg, #f0f7ff 0%, #ffffff 100%);
    border-radius: 18px;
    padding: 20px 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    opacity: 0;
    transform: scale(.95) translateY(40px);
    pointer-events: none;
    transition: opacity .75s cubic-bezier(.42, 0, .58, 1), transform .75s cubic-bezier(.42, 0, .58, 1);
}

.emi-result-container.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    animation: popResult 1.1s cubic-bezier(.42, 0, .58, 1);
}

.emi-primary-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
    width: 100%;
}

.emi-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: #222;
    letter-spacing: 1px;
    animation: fadeInNum 1.2s cubic-bezier(.42, 0, .58, 1);
}

.emi-label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #0066cc;
}

.emi-progress-wrapper {
    width: 100%;
}

.emi-progress-bar {
    width: 100%;
    height: 16px;
    background: #cfd8dc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.emi-progress {
    height: 100%;
    width: 0;
    border-radius: 12px;
    background: #2196f3;
    transition: width 1.25s cubic-bezier(.42, 0, .58, 1), background .4s;
}

.emi-scale {
    display: flex;
    justify-content: space-between;
    font-size: .63rem;
    color: #555;
    letter-spacing: .5px;
    margin-top: -2px;
}

.emi-breakdown {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emi-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    letter-spacing: .4px;
    color: #222;
    background: #e9f4ff;
    padding: 6px 8px;
    border-radius: 8px;
}

.emi-breakdown-row span.value {
    font-weight: 600;
    color: #111;
}

.emi-extra-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    width: 100%;
    margin-top: 12px;
}

.emi-stat {
    background: #eef7ff;
    padding: 8px 8px 6px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: fadeInTips 1s cubic-bezier(.42, 0, .58, 1);
}

.emi-stat .label {
    font-size: .55rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #0066cc;
    font-weight: 600;
}

.emi-stat .val {
    font-size: .9rem;
    font-weight: 700;
    color: #222;
}

.emi-tips {
    margin-top: 14px;
    font-size: .7rem;
    font-style: italic;
    color: #333;
    text-align: center;
    line-height: 1.3;
    animation: fadeInTips 1.1s cubic-bezier(.42, 0, .58, 1);
}

.emi-disclaimer-box {
    margin-top: 10px;
    font-size: .58rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #555;
    text-align: center;
}

/* Hide bottom banner on desktop (850px and above) */
@media (min-width:850px) {
    .bottom-banner {
        display: none;
    }
}

/* Hide left banner on mobile (below 900px) */
@media (max-width:900px) {
    .left-banner {
        display: none;
    }

    /* Show bottom banner on mobile */
    .bottom-banner {
        display: flex;
    }

    .emi-tool-section {
        padding: 30px 18px 18px;
    }
}

@media (max-width:700px) {
    .emi-form {
        max-width: 100%;
    }

    .emi-result-container {
        max-width: 100%;
    }

    .emi-interaction-row {
        flex-direction: column;
    }

    .emi-title {
        font-size: 1.7rem;
    }
}

@keyframes popResult {
    0% {
        opacity: 0;
        transform: scale(.8) translateY(60px);
    }

    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInNum {
    from {
        opacity: 0;
        transform: scale(.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInTips {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reuse site card grid if used on finance category page */
.cards-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    padding: 20px;
}

.card {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.card-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.card h2 {
    font-size: 2rem;
}

.tool-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.tool-name {
    font-size: 14px;
    text-align: start;
    flex: 1;
    transform: translateX(-20px);
    margin-left: 10%;
}

.tool-link {
    padding: 6px 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background .3s;
    margin-left: auto;
    border: 3px solid #004080;
}

.tool-link:hover {
    background: #004080;
}

@media (max-width:1000px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:600px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width:850px) {
    .left-banner {
        display: none;
    }
}

@media (max-width:850px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 10px;
        background: #0066cc;
        position: absolute;
        top: 157px;
        width: 50%;
        padding: 10px 0 0 5px;
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }
}

.layout-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-row {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
}

.scroll-panel {
    background: linear-gradient(120deg, #e3f2fd 0%, #f5f5f5 100%);
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 30% 0;
}