@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- Base Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

 /* --- Navigation Styles --- */
        .navbar {
            background: linear-gradient(135deg, #2c3e50, #34495e);
            padding: 0;
            position:static;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
        }

        .nav-logo {
            color: #ffffff;
            font-size: 20px;
            font-weight: 700;
            text-decoration: none;
            padding: 15px 0;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            margin: 0;
        }

        .nav-item {
            margin: 0;
        }

        .nav-link {
            color: #ffffff;
            text-decoration: none;
            padding: 15px 20px;
            display: block;
            font-weight: 500;
            transition: background-color 0.3s ease, color 0.3s ease;
            position: relative;
        }

        .nav-link:hover,
        .nav-link.active {
            background-color: rgba(255, 255, 255, 0.1);
            color: #3498db;
        }

        .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background-color: #3498db;
        }

        /* Mobile Menu Styles */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            color: #ffffff;
            font-size: 24px;
            cursor: pointer;
            padding: 10px;
        }

.page-container {
    width: 100%;
    max-width: 1100px;
}

.main-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
}

/* --- Main 2-Column Grid Layout --- */
.page-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
    align-items: start;
}

/* --- Right Column Wrapper --- */
.right-sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* --- Column 1: Calculator --- */
.calculator-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 20px;
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #34495e; }
.form-group input[type="number"] { width: 100%; padding: 10px; border: 1px solid #dce4ec; border-radius: 8px; font-size: 15px; box-sizing: border-box; transition: border-color 0.3s; }
.form-group input[type="number"]:focus { outline: none; border-color: #3498db; }

.term-group { display: flex; align-items: center; gap: 15px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: #e9eef3; border-radius: 5px; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: #3498db; border-radius: 50%; }
#termValue { font-weight: 600; color: #3498db; background-color: #eaf5fc; padding: 5px 12px; border-radius: 5px; min-width: 30px; text-align: center; font-size: 14px; }
button { width: 100%; padding: 14px; background: linear-gradient(45deg, #3498db, #2980b9); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 10px; transition: transform 0.2s ease; }
button:hover { transform: translateY(-2px); }

.main-result { text-align: center; margin-top: 25px; padding-top: 20px; border-top: 1px solid #e8eef3; }
.main-result span { font-size: 16px; color: #5a6b80; }
.main-result strong { display: block; font-size: 32px; font-weight: 700; color: #2c3e50; margin-top: 5px; }


/* --- Right Column Content --- */
.results-breakdown, .info-sidebar { background-color: #ffffff; padding: 25px; border-radius: 15px; border: 1px solid #e8eef3; }
.results-breakdown h2, .info-sidebar h2 { text-align: left; font-size: 18px; color: #34495e; margin-top: 0; padding-bottom: 8px; border-bottom: 1px solid #e8eef3; }

.chart-container { position: relative; height: 220px; width: 100%; margin-bottom: 20px; }

.result-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 14px; border-bottom: 1px dashed #e8eef3; }
.result-item:last-child { border-bottom: none; }
.result-item span { color: #5a6b80; }
.result-item small { color: #95a5a6; }
.result-item strong { color: #2c3e50; font-weight: 600; font-size: 15px; }

/* NEW: Amortization Section Styles */
.amortization-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8eef3;
}
.secondary-button {
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    color: #ffffff;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.schedule-container {
    display: none; /* Hidden by default */
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e8eef3;
    border-radius: 8px;
}
.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.amortization-table th, .amortization-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid #e8eef3;
}
.amortization-table thead th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    font-weight: 600;
    color: #34495e;
}
.amortization-table tbody tr:nth-child(even) {
    background-color: #fdfdfe;
}
.amortization-table td:first-child, .amortization-table th:first-child {
    text-align: center;
    font-weight: 600;
}
/* END NEW STYLES */

.promo-section { background-color: #f8faff; border: 1px solid #e8eef3; border-radius: 12px; padding: 20px; text-align: center; margin-bottom: 25px; }
.promo-section h3 { margin-top: 0; color: #2c3e50; text-align: center; }
.promo-section p { color: #5a6b80; font-size: 14px; margin-bottom: 20px; text-align: center; }
.promo-button { display: block; width: 100%; padding: 12px; background-color: #28a745; color: white; border-radius: 8px; font-weight: 600; text-decoration: none; transition: background-color 0.3s ease; box-sizing: border-box; }
.promo-button:hover { background-color: #218838; }

.info-sidebar h3 { font-size: 15px; color: #2c3e50; margin-top: 15px; margin-bottom: 5px; text-align: left; }
.info-sidebar p { font-size: 14px; color: #5a6b80; line-height: 1.6; margin: 0; }

/* --- Footer --- */
footer { width: 100%; max-width: 1100px; margin: 40px auto 0; padding: 20px; text-align: center; border-top: 1px solid #e0e6ec; }
footer p { margin: 5px 0; color: #5a6b80; font-size: 14px; }
footer a { color: #3498db; font-weight: 600; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.disclaimer { font-size: 12px; font-style: italic; color: #95a5a6; }

/* --- Responsive Layout --- */
        @media (max-width: 992px) {
            .page-wrapper {
                grid-template-columns: 1fr;
            }
            .calculator-container {
                position: static;
            }
        }

        @media (max-width: 768px) {
            .mobile-menu-toggle {
                display: block;
            }

            .nav-menu {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: linear-gradient(135deg, #2c3e50, #34495e);
                flex-direction: column;
                transform: translateY(-100%);
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            }

            .nav-menu.active {
                transform: translateY(0);
                opacity: 1;
                visibility: visible;
            }

            .nav-link {
                padding: 15px 20px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

            .nav-link:last-child {
                border-bottom: none;
            }

            .main-content {
                padding: 10px;
            }

            .page-content {
                padding: 25px;
            }

            .main-title {
                font-size: 24px;
            }
        }
