/* ============================================================
   Zippy Fund — Loan Calculator page
   Modern, stylish, blue-themed widget matching the borrowing
   pages (#0e86cb / #113a5a). Self-contained "lcal-" namespace.
   ============================================================ */

.lcal-page {
  background: #f4f8fc;
  color: #2b4a63;
}
.lcal-page main {
  overflow: hidden;
}

/* ---------- Hero ---------- */
.lcal-hero {
  position: relative;
  background: radial-gradient(120% 120% at 50% 0%, #103f63 0%, #0c2e49 60%, #0a2740 100%);
  padding-top: 160px;
  padding-bottom: 150px;
  text-align: center;
  color: #eaf3fb;
  overflow: hidden;
}
.lcal-hero .container {
  position: relative;
  z-index: 2;
}
.lcal-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  z-index: 1;
}
.lcal-hero-blob--1 {
  width: 380px;
  height: 380px;
  background: #1f8fd0;
  top: -120px;
  left: -80px;
}
.lcal-hero-blob--2 {
  width: 320px;
  height: 320px;
  background: #0e6aa3;
  bottom: -130px;
  right: -60px;
}

.lcal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #d6ecfb;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.lcal-hero h1 {
  margin: 0 auto;
  max-width: 760px;
  color: #ffffff;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.05;
  font-weight: 900;
}
.lcal-subcopy {
  margin: 20px auto 0;
  max-width: 640px;
  color: #bcd6ea;
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Calculator card ---------- */
.lcal-tool {
  background: #f4f8fc;
  padding-bottom: 90px;
}
.lcal-tool .container {
  margin-top: -100px;
}

.lcal-card {
  position: relative;
  z-index: 3;
  background: #ffffff;
  border: 1px solid #e4edf5;
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(12, 46, 73, 0.18);
  padding: 40px;
}

/* Loan type dropdown row */
.lcal-type-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-bottom: 30px;
  margin-bottom: 32px;
  border-bottom: 1px solid #eef3f8;
}
.lcal-type-field {
  flex: 0 0 auto;
  min-width: 320px;
}
.lcal-type-field label {
  display: block;
  margin-bottom: 10px;
  color: #113a5a;
  font-size: 15px;
  font-weight: 800;
}
.lcal-select-wrap {
  position: relative;
}
.lcal-select-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #0e86cb;
  font-size: 20px;
  pointer-events: none;
}
.lcal-select-caret {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #5a7790;
  font-size: 14px;
  pointer-events: none;
}
#lcal-type {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 60px;
  border: 1.6px solid #d6e3ee;
  border-radius: 12px;
  background: #f9fcff;
  color: #113a5a;
  font-size: 18px;
  font-weight: 800;
  padding: 0 48px 0 50px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#lcal-type:focus {
  outline: 0;
  border-color: #0e86cb;
  box-shadow: 0 0 0 4px rgba(14, 134, 203, 0.12);
}
.lcal-type-blurb {
  flex: 1 1 260px;
  margin: 0 0 6px;
  color: #5a7790;
  font-size: 14.5px;
  line-height: 1.55;
  font-weight: 600;
}

/* ---------- Layout: inputs + result ---------- */
.lcal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: stretch;
}

.lcal-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.lcal-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}
.lcal-field label {
  color: #113a5a;
  font-size: 15px;
  font-weight: 800;
}

.lcal-input-wrap {
  display: flex;
  align-items: center;
  border: 1.6px solid #dce7f1;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 14px;
  height: 52px;
  box-shadow: 0 1px 2px rgba(17, 58, 90, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lcal-input-wrap--sm {
  height: 44px;
  width: 178px;
  flex: 0 0 auto;
  padding: 0 12px;
}
.lcal-input-wrap:focus-within {
  border-color: #0e86cb;
  background: #f9fcff;
  box-shadow: 0 0 0 4px rgba(14, 134, 203, 0.12);
}
.lcal-prefix,
.lcal-suffix {
  color: #7c93a6;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.lcal-suffix { margin-left: 6px; }
.lcal-prefix { margin-right: 4px; }
.lcal-input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #113a5a;
  font-size: 18px;
  font-weight: 800;
  width: 100%;
  min-width: 0;
  text-align: right;
}

/* Range slider with filled-track feel */
.lcal-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin-top: 16px;
  border-radius: 6px;
  background: #dde9f2;
  cursor: pointer;
}
.lcal-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0e86cb;
  border: 4px solid #ffffff;
  box-shadow: 0 2px 8px rgba(7, 93, 145, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.lcal-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.lcal-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0e86cb;
  border: 4px solid #ffffff;
  box-shadow: 0 2px 8px rgba(7, 93, 145, 0.45);
  cursor: pointer;
}
.lcal-range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #7c93a6;
  font-size: 12px;
  font-weight: 700;
}

/* Months / Years toggle */
.lcal-toggle {
  display: inline-flex;
  margin-top: 14px;
  border: 1.6px solid #d6e3ee;
  border-radius: 10px;
  overflow: hidden;
}
.lcal-toggle-btn {
  border: 0;
  background: #ffffff;
  color: #4b6780;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lcal-toggle-btn.is-active {
  background: linear-gradient(180deg, #0e86cb 0%, #086ea9 100%);
  color: #ffffff;
}

.lcal-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  color: #6c8598;
  font-size: 12.5px;
  line-height: 1.5;
}
.lcal-note i { color: #0e86cb; margin-top: 2px; }

/* ---------- Result panel ---------- */
.lcal-result {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0f3a5b 0%, #0c2e49 100%);
  border-radius: 18px;
  padding: 34px 32px;
  color: #eaf3fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.lcal-result-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #9cc3e2;
}
.lcal-result-amount {
  margin: 6px 0 24px;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
}
.lcal-result-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.lcal-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lcal-result-row span { color: #b9d3e8; display: inline-flex; align-items: center; }
.lcal-result-row strong { color: #ffffff; font-weight: 800; }
.lcal-result-row--total { border-bottom: 0; }
.lcal-result-row--total span,
.lcal-result-row--total strong { font-size: 17px; color: #ffffff; }

.lcal-bar {
  display: flex;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  margin: 22px 0 8px;
  background: rgba(255, 255, 255, 0.12);
}
.lcal-bar-principal { background: #36b3ff; transition: width 0.35s ease; }
.lcal-bar-interest { background: #f5a623; transition: width 0.35s ease; }
.lcal-bar-caption {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #aecbe3;
}

.lcal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 7px;
}
.lcal-dot--principal { background: #36b3ff; }
.lcal-dot--interest { background: #f5a623; }

.lcal-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  min-height: 54px;
  border-radius: 11px;
  background: linear-gradient(180deg, #18a0e8 0%, #0e86cb 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(7, 93, 145, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lcal-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(7, 93, 145, 0.5);
  color: #ffffff;
}
.lcal-learn-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: #9cc3e2;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.lcal-learn-link:hover { color: #ffffff; }
.lcal-result-foot {
  margin: 16px 0 0;
  text-align: center;
  color: #88add0;
  font-size: 12px;
}
.lcal-result-foot i { color: #36b3ff; margin-right: 4px; }

/* ---------- Loan type quick-select cards ---------- */
.lcal-types-title {
  margin: 56px 0 6px;
  text-align: center;
  color: #113a5a;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 900;
}
.lcal-types-sub {
  margin: 0 auto 30px;
  max-width: 620px;
  text-align: center;
  color: #5a7790;
  font-size: 15.5px;
}
.lcal-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.lcal-type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  background: #ffffff;
  border: 1.6px solid #e4edf5;
  border-radius: 14px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.lcal-type-card:hover {
  transform: translateY(-3px);
  border-color: #bfdcf0;
  box-shadow: 0 14px 28px rgba(12, 46, 73, 0.12);
}
.lcal-type-card.is-active {
  border-color: #0e86cb;
  background: #f3fafe;
  box-shadow: 0 14px 28px rgba(14, 134, 203, 0.18);
}
.lcal-type-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(180deg, #e8f4fc 0%, #d5ecfa 100%);
  color: #0e86cb;
  font-size: 21px;
}
.lcal-type-card.is-active .lcal-type-card-icon {
  background: linear-gradient(180deg, #18a0e8 0%, #0e86cb 100%);
  color: #ffffff;
}
.lcal-type-card-name {
  color: #113a5a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}
.lcal-type-card-range {
  color: #7c93a6;
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------- Info / education ---------- */
.lcal-info {
  background: #ffffff;
  padding-top: 84px;
  padding-bottom: 90px;
}
.lcal-info h2 {
  color: #113a5a;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  margin: 0 0 18px;
}
.lcal-info p {
  color: #4b6780;
  font-size: 17px;
  line-height: 1.64;
  margin: 0 0 16px;
}
.lcal-bullets {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: #34526b;
  font-size: 16px;
  line-height: 1.6;
}
.lcal-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.lcal-bullets i { color: #18a0e8; margin-top: 3px; }

.lcal-formula-card {
  background: linear-gradient(165deg, #eef5fb 0%, #e3eef8 100%);
  border: 1px solid #d9e6f0;
  border-radius: 18px;
  padding: 32px;
}
.lcal-formula-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #113a5a;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 14px;
}
.lcal-formula-card h3 i { color: #0e86cb; }
.lcal-formula {
  background: #ffffff;
  border: 1px dashed #b9d0e3;
  border-radius: 10px;
  padding: 16px;
  color: #0e6aa3;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 18px;
}
.lcal-formula-card ul {
  margin: 0;
  padding-left: 18px;
  color: #4b6780;
  font-size: 15px;
  line-height: 1.75;
}
.lcal-formula-card strong { color: #113a5a; }
.lcal-formula-note {
  margin: 16px 0 0 !important;
  font-size: 13.5px !important;
  color: #5a7790 !important;
}

/* Tips */
.lcal-tips { margin-top: 0; }
.lcal-tips h2 { text-align: center; margin-bottom: 34px; }
.lcal-tip-card {
  height: 100%;
  background: #f7fbfe;
  border: 1px solid #e4edf5;
  border-radius: 16px;
  padding: 28px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lcal-tip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(12, 46, 73, 0.1);
}
.lcal-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: linear-gradient(180deg, #18a0e8 0%, #0e86cb 100%);
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 16px;
}
.lcal-tip-card h4 {
  color: #113a5a;
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 10px;
}
.lcal-tip-card p {
  color: #4b6780;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* FAQ */
.lcal-faq { margin-top: 70px; }
.lcal-faq h2 { text-align: center; margin-bottom: 30px; }
.lcal-accordion { max-width: 860px; margin: 0 auto; }
.lcal-accordion .accordion-item {
  border: 1px solid #e4edf5;
  border-radius: 12px !important;
  margin-bottom: 14px;
  overflow: hidden;
  background: #ffffff;
}
.lcal-accordion .accordion-button {
  font-weight: 800;
  color: #113a5a;
  font-size: 17px;
  background: #ffffff;
  padding: 20px 22px;
}
.lcal-accordion .accordion-button:not(.collapsed) {
  color: #0e6aa3;
  background: #f3fafe;
  box-shadow: none;
}
.lcal-accordion .accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(14, 134, 203, 0.15);
}
.lcal-accordion .accordion-body {
  color: #4b6780;
  font-size: 15.5px;
  line-height: 1.65;
  padding: 4px 22px 22px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .lcal-grid { grid-template-columns: 1fr; gap: 34px; }
  .lcal-tool .container { margin-top: -80px; }
  .lcal-type-field { min-width: 0; width: 100%; }
  .lcal-hero { padding-top: 140px; padding-bottom: 130px; }
}

@media (max-width: 575px) {
  .lcal-card { padding: 24px 20px; }
  .lcal-result { padding: 28px 22px; }
  .lcal-input-wrap--sm { min-width: 124px; }
  .lcal-input-wrap input { font-size: 18px; }
  .lcal-types-grid { grid-template-columns: repeat(2, 1fr); }
}
