/* =================================
   Custom Font
   ================================= */
@font-face {
    font-family: 'MyFont';
    src: url('fonts/myfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* =================================
   Global Styles & Variables
   ================================= */
:root {
    --primary-color: #E0E0E0; /* For headings and primary text */
    --secondary-color: #333; /* For borders and subtle dividers */
    --accent-color: #5A4FCF; /* A modern purple for active states */
    --text-color: #E0E0E0; /* For general body text */
    --background-color: #121212; /* Main dark background */
    --surface-color: #1E1E1E; /* For cards and elevated surfaces */
    --border-radius: 12px;
    --contact-bar-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'MyFont', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: var(--contact-bar-height); /* Space for sticky bar */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

/* =================================
   Header & Navigation
   ================================= */
.main-header {
    background-color: var(--surface-color);
    padding: 10px 0;
    border-bottom: 1px solid var(--secondary-color);
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.tab-link {
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
    border: 1px solid transparent;
}

.tab-link.active {
    background-color: var(--accent-color);
    font-weight: bold;
    border-color: var(--accent-color);
}

.tab-link:not(.active):hover {
    background-color: #2c2c2c;
}

h2.page-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

/* =================================
   Layout
   ================================= */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* =================================
   Sticky Contact Bar
   ================================= */
.sticky-contact-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--contact-bar-height);
    background-color: var(--surface-color);
    border-top: 1px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.contact-info .contact-title {
    font-size: 0.9rem;
    color: #B0B0B0;
    margin-bottom: 2px;
}

.contact-info .contact-number {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.contact-button {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: #4a3dbb;
}


/* =================================
   General Sections
   ================================= */
.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--secondary-color);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* =================================
   Calculator Section
   ================================= */
.calculator-form .form-group {
    margin-bottom: 25px;
}

.calculator-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1rem;
}

.form-label {
    font-family: 'MyFont', sans-serif;
}

#amount-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 15px;
}

/* Slider Styles */
.slider-group {
    position: relative;
    padding-top: 10px;
}

#loanAmountSlider {
    height: 4px;
    border: none;
    box-shadow: none;
}

#loanAmountSlider .noUi-connect {
    background: var(--accent-color);
}

#loanAmountSlider .noUi-handle {
    height: 32px;
    width: 32px;
    top: -14px;
    right: -16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--surface-color);
    box-shadow: 0 0 0 2px var(--accent-color), 0 4px 8px rgba(0,0,0,0.4);
    cursor: grab;
    transition: transform 0.2s ease;
}

#loanAmountSlider .noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.noUi-handle:after, .noUi-handle:before {
    display: none;
}

#loanAmountSlider .noUi-base {
    background: #333;
    border-radius: 2px;
}

.slider-markers {
    display: none; /* Hide old markers */
}

/* noUiSlider Pips */
.noUi-pips {
    color: #888;
}

.noUi-pips-horizontal {
    padding: 10px 0;
    height: 80px;
    top: -22px;
}

.noUi-value {
    font-size: 12px;
}

.noUi-value-horizontal {
    transform: translate(-50%, 50%) rotate(45deg) scale(0.8);
}

.noUi-marker-horizontal {
    height: 8px;
}

/* Manual Input */
#loanAmountInput {
    width: 100%;
    padding: 12px;
    background-color: #2c2c2c;
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#loanAmountInput:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(90, 79, 207, 0.2);
}

#loanAmountInput {
    font-family: 'MyFont', sans-serif;
}

/* Mode & Bank Selector */
.mode-selector,
.bank-selector,
.installments-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.mode-option,
.bank-option,
.installment-option {
    padding: 15px;
    background-color: var(--surface-color);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
    font-family: 'MyFont';
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: var(--text-color);
    box-sizing: border-box; /* Unify box model */
}

.mode-option.selected,
.bank-option.selected,
.installment-option.selected {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    font-weight: bold;
}

/* Buttons & Result */
.btn-primary {
    display: block;
    width: 100%;
    padding: 15px;
    box-sizing: border-box; /* Ensures padding doesn't add to width */
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-family: 'MyFont';
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.btn-primary:hover {
    background-color: #4a3dbb;
}

.result-box {
    margin-top: 25px;
    padding: 20px;
    background-color: #252525;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: opacity 0.5s ease;
}
.result-box.hidden {
    display: none;
}
#price {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* CTA Box */
.cta-box {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--surface-color);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-box.hidden {
    display: none;
}
.cta-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-box h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.cta-box p {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #B0B0B0; /* Lighter text for description */
}

.cta-button {
    text-decoration: none;
}

/* =================================
   Process Section
   ================================= */
.process-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #2c2c2c;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.7;
}

.process-steps {
    list-style: none;
    padding-right: 20px;
    counter-reset: step-counter;
}

.process-steps li {
    position: relative;
    padding-right: 35px;
    margin-bottom: 20px;
    counter-increment: step-counter;
}

.process-steps li::before {
    content: counter(step-counter);
    position: absolute;
    right: -20px;
    top: -2px;
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}


/* =================================
   FAQ Section
   ================================= */
.faq-item {
    border-bottom: 1px solid var(--secondary-color);
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: right;
    font-family: 'MyFont';
    font-size: 1.1rem;
    padding: 20px 0;
    cursor: pointer;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}
.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-color); /* Corrected color for dark mode */
}
