/* -------------------------
   Theme (soft + professional)
-------------------------- */
:root{
  --bg: #f8f9fc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e4ecf7;

  --primary: #0B3D91;
  --primary-2: #082d6b;
  --primary-light: rgba(11, 61, 145, 0.08);

  --shadow: 0 10px 28px rgba(11, 61, 145, 0.08);
  --radius: 16px;
  --hh: 72px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }

.muted{ color: var(--muted); }

/* Bootstrap cards keep working, we enhance the look */
.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* -------------------------
   Header / Navbar
-------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .navbar{
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(230, 237, 247, 0.8);
  transition: all 0.3s ease;
}

.navbar-brand .brand-soft{
  opacity: .85;
  margin-left: 6px;
  font-weight: 700;
}

/* -------------------------
   Search input style
-------------------------- */
.search-input{
  border-radius: 12px !important;
  border: 1px solid var(--line) !important;
  background: #fbfdff !important;
  color: var(--text) !important;
  height: 44px;
}

.search-input:focus{
  border-color: rgba(11,61,145,0.5) !important;
  box-shadow: 0 0 0 4px rgba(11,61,145,0.12) !important;
}

.btn-primary{
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 10px 18px rgba(11,61,145,0.22);
}

.btn-primary:hover{
  background: var(--primary-2) !important;
  border-color: var(--primary-2) !important;
}

/* -------------------------
   Scientific Calculator Widget
-------------------------- */
.sci-title{
  font-weight: 800;
  letter-spacing: -0.3px;
  font-size: 1.4rem;
}

.sci-toggle{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.sci-display{
  width: 100%;
  background: #0b1220;
  color: #eaf1ff;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: right;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
}

.sci-keys{
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

@media (max-width: 991.98px){
  .sci-keys{ grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 575.98px){
  .sci-keys{ grid-template-columns: repeat(4, 1fr); }
}

.sci-keys button{
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfdff;
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  transition: background .15s ease, transform .06s ease, border-color .15s ease;
}

.sci-keys button:hover{
  background: #f1f6ff;
  border-color: rgba(11,61,145,0.28);
}
.sci-keys button:active{ transform: translateY(1px); }

.sci-keys button.key-op{
  background: #eef5ff;
  border-color: rgba(11,61,145,0.22);
}
.sci-keys button.key-eq{
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.sci-keys button.key-eq:hover{ background: var(--primary-2); }

/* -------------------------
   Columns section
-------------------------- */
.columns-title{
  font-weight: 900;
  font-size: 1.35rem;
  color: #0b3d91;
  margin: 0;
}

.col-inner h3{
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #166534;
}

.col-inner ul{
  padding-left: 16px;
  margin: 0;
  color: var(--muted);
}

.col-inner li{ margin: 7px 0; }

.calc-link{
  color: var(--primary);
  font-weight: 650;
}

/* -------------------------
   Details section
-------------------------- */
.details-title{
  margin: 0 0 10px;
  font-weight: 900;
  font-size: 1.25rem;
  color: #0b3d91;
}

.details-text{
  margin: 0 0 14px;
  line-height: 1.75;
  color: var(--muted);
}

.details-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.details-box{
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 14px;
  padding: 14px 14px;
}

.details-box h3{
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 900;
  color: #166534;
}

.details-box p{
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #eef5ff;
  border: 1px solid rgba(11,61,145,0.18);
  padding: 2px 6px;
  border-radius: 10px;
  color: #0b3d91;
  white-space: nowrap;
}

/* -------------------------
   FAQ Accordion (Custom)
-------------------------- */
.faq-title{
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 1.25rem;
  color: #0b3d91;
}
.faq-subtitle{
  margin: 0 0 14px;
  line-height: 1.6;
}

.faq-accordion{
  display: grid;
  gap: 10px;
}

.faq-item{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
}

.faq-q{
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  color: var(--text);
  text-align: left;
}

.faq-icon{
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #0b3d91;
  font-weight: 900;
  flex: 0 0 auto;
  transition: transform .18s ease;
}

.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height .22s ease;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.faq-a p{
  margin: 0;
  padding: 12px 14px 14px;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item.open .faq-icon{
  transform: rotate(45deg);
}

.faq-item.open .faq-a{
  max-height: 500px;
}

/* -------------------------
   About / Disclaimer
-------------------------- */
.about-card{
  line-height: 1.7;
  color: var(--muted);
}

.disclaimer-title{
  margin: 0 0 10px;
  font-weight: 900;
  font-size: 1.25rem;
  color: #0b3d91;
}

/* -------------------------
   Footer
-------------------------- */
.site-footer{
  padding: 18px 0 26px;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}


/* assets/css/mortgage.css */

.page-title{
  font-weight: 900;
  font-size: 1.6rem;
  color: #0b3d91;
}

.section-h2{
  font-weight: 900;
  font-size: 1.2rem;
  color: #0b3d91;
}

.mortgage-badge{
  border: 1px solid rgba(11,61,145,0.18);
  background: #eef5ff !important;
  color: #0b3d91 !important;
  font-weight: 800;
}

.result-hero{
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 14px;
  padding: 14px;
}

.result-big{
  font-size: 1.85rem;
  font-weight: 950;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 2px 0 2px;
}

.mini-stat{
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
}

.mini-stat-val{
  font-weight: 900;
  color: var(--text);
}

.chart-wrap{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}

/* keep chart consistent height on all screens */
.chart-fixed{
  position: relative;
  height: 220px;
}

/* Accurate breakdown table */
.breakdown-table{
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fbfdff;
}

.break-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.break-row:first-child{
  border-top: 0;
}

.break-row .label{
  font-weight: 800;
  color: var(--text);
}

.break-row .val{
  font-weight: 900;
  color: #0b3d91;
  font-variant-numeric: tabular-nums;
}

.break-row.total{
  background: #ffffff;
}

.break-row.total .label{
  color: #166534;
}

.break-row.total .val{
  color: #166534;
}

/* amort table */
.amort-table th{
  font-size: 0.9rem;
  color: #0b3d91;
  font-weight: 900;
  border-bottom: 1px solid var(--line);
}
.amort-table td{
  color: var(--muted);
}
.amort-table td.text-end{
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px){
  .result-big{ font-size: 1.55rem; }
  .chart-fixed{ height: 200px; }
}


/* assets/css/loan.css */
/* Page-only styling, matches your theme and uses your global variables */

.page-title{
  font-weight: 900;
  font-size: 1.6rem;
  color: #0b3d91;
}

.section-h2{
  font-weight: 900;
  font-size: 1.2rem;
  color: #0b3d91;
}

.section-h3{
  font-weight: 900;
  font-size: 1.05rem;
  color: #0b3d91;
}

.panel{
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 14px;
}

.result-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-title{
  font-weight: 900;
  color: #166534;
  font-size: 1.05rem;
  padding: 6px 10px;
  border-radius: 12px;
  background: #eef5ff;
  border: 1px solid rgba(11,61,145,0.18);
}

.result-grid{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.rrow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #ffffff;
}

.rrow .label{
  font-weight: 800;
  color: var(--text);
}

.rrow .val{
  font-weight: 950;
  color: #0b3d91;
  font-variant-numeric: tabular-nums;
}

.chartBox{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  height: 240px;
  position: relative;
}

.amort-table th{
  font-size: 0.9rem;
  color: #0b3d91;
  font-weight: 900;
  border-bottom: 1px solid var(--line);
}
.amort-table td{
  color: var(--muted);
}
.amort-table td.text-end{
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px){
  .chartBox{ height: 210px; }
}


/* assets/css/interest.css */
/* Loan-calculator style + wider cards (scoped to interest page only) */

.interest-container {
  /* wider than default bootstrap container */
  max-width: 1320px;
}

.interest-page .soft-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
  background: #ffffff;
}

.interest-page .top-hint {
  background: #2f6aa0;
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}

/* title area */
.interest-page .calc-title h2 {
  color: #0f172a;
}
.interest-page .calc-title p {
  color: #475569;
}

/* Results panel like loan */
.interest-page .results-panel {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  padding: 18px;
}

.interest-page .results-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eaf6ea;
  color: #1b5e20;
  border: 1px solid rgba(27, 94, 32, 0.18);
  font-weight: 800;
  font-size: 1.15rem;
}

.interest-page .results-lines .line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.interest-page .results-lines .line strong {
  font-weight: 900;
  color: #0b3d91;
}

.interest-page .results-lines .line-soft {
  background: #fbfdff;
}

/* chart boxes like loan */
.interest-page .chart-card {
  height: 220px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 10px;
  background: #ffffff;
}

/* formula box unchanged (soft) */
.interest-page .formula-box {
  background: #f5f8ff;
  border: 1px solid rgba(47,106,160,0.18);
  border-radius: 14px;
  padding: 12px;
}

.interest-page .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* table style */
.interest-page .table-soft {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.interest-page .table thead th {
  background: #2f6aa0;
  color: #fff;
  border: none;
  font-weight: 800;
}

/* pills */
.interest-page .nav-pills .nav-link {
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.interest-page .nav-pills .nav-link.active {
  background: #2f6aa0;
}

/* FAQ */
.interest-page .faq-accordion {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.interest-page .faq-item + .faq-item {
  border-top: 1px solid rgba(0,0,0,0.06);
}
.interest-page .faq-q {
  width: 100%;
  border: 0;
  background: #f7fbff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  text-align: left;
}
.interest-page .faq-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e8f1ff;
  color: #2f6aa0;
  flex: 0 0 auto;
  font-weight: 900;
}
.interest-page .faq-a {
  padding: 0 16px;
  color: #334155;
  line-height: 1.55;
  background: #ffffff;
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease;
}
.interest-page .faq-item.open .faq-a {
  padding: 12px 16px;
}

/* responsive */
@media (max-width: 576px) {
  .interest-container { max-width: 100%; }
  .interest-page .chart-card { height: 200px; }
}



/* assets/css/payment.css */
/* Soft + professional (matches your other calculator pages). */

.payment-container {
  max-width: 1320px;
}

.soft-card {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.top-hint {
  background: rgba(17, 94, 163, 0.12);
  color: #0b3b66;
  border: 1px solid rgba(17, 94, 163, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.98rem;
}

.calc-title h2 {
  color: #0f172a;
}

.mode-tabs .nav-link {
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 14px;
}

.mode-tabs .nav-link.active {
  background: #1f6fb2;
}

.results-panel {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.7);
  padding: 16px;
}

.results-pill {
  display: inline-block;
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.22);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.results-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 2px;
}

.results-hero .label {
  font-weight: 700;
  color: #0f172a;
}

.results-hero .value {
  font-weight: 800;
  font-size: 1.35rem;
  color: #0b3b66;
}

.results-lines {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.results-lines .line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  padding: 12px 12px;
}

.results-lines .line-soft {
  background: rgba(241, 245, 249, 0.7);
}

.chart-card {
  height: 220px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  padding: 10px;
}

.table-soft {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.table-soft thead th {
  background: rgba(17, 94, 163, 0.10);
  color: #0b3b66;
  font-weight: 800;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

/* Formula box */
.formula-box {
  border: 1px dashed rgba(16, 24, 40, 0.18);
  background: rgba(248, 250, 252, 0.7);
  border-radius: 14px;
  padding: 14px;
}

.formula-box .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  color: #0f172a;
}

/* FAQ */
.faq-accordion {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 14px 14px;
  background: rgba(241, 245, 249, 0.75);
  font-weight: 800;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-weight: 900;
  color: #1f6fb2;
}

.faq-a {
  padding: 12px 14px 14px;
  color: #334155;
  background: #ffffff;
  line-height: 1.6;
}

/* Better spacing on small screens */
@media (max-width: 991px) {
  .chart-card {
    height: 240px;
  }
}
