/* ========================
   GLOBAL RESET & VARIABLES
   ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;

  --brand-green-1: #16a34a;
  --brand-green-2: #10b981;

  --blue-1: #3b82f6;
  --blue-2: #60a5fa;

  --purple-1: #a855f7;
  --purple-2: #d946ef;

  --orange-1: #f97316;
  --orange-2: #fb923c;

  --glass: rgba(255, 255, 255, 0.92);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========================
   NAVBAR
   ======================== */
.navbar {
  width: 100%;
  padding: 20px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.navbar.scrolled {
  padding: 12px 48px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.08);
}

.logo {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--brand-green-1);
}

.nav-links a {
  margin-left: 28px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--brand-green-1);
}

/* ========================
   HERO SECTION
   ======================== */
.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 18px;
}

.hero p {
  max-width: 860px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================
   BUTTONS
   ======================== */
.cta-btn {
  padding: 14px 40px;
  border-radius: 999px;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.cta-btn:hover {
  transform: translateY(-4px);
}

#openLoanBtn {
  background: linear-gradient(90deg, var(--brand-green-1), var(--brand-green-2));
}

#openEducationLoanBtn {
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
}

#openBalanceTransferBtn {
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2));
}

.referral-btn {
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
}

/* ========================
   MODALS
   ======================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.15);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  padding: 28px;
  position: relative;
  animation: modalIn 0.35s ease;
  box-shadow: 0 40px 80px rgba(2, 6, 23, 0.15);
}

@keyframes modalIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ========================
   FORM HEADERS
   ======================== */
.form-header {
  padding: 14px 16px;
  border-radius: 10px;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: left;
}

.edu-header {
  background: linear-gradient(90deg, var(--brand-green-1), var(--brand-green-2));
}

.bt-header {
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
}

.ref-header {
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2));
}

.community-header {
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
}

/* ========================
   FORM FIELDS
   ======================== */
.modal-content input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.modal-content input:focus {
  outline: none;
  border-color: var(--brand-green-1);
}

/* ========================
   FORM FEEDBACK
   ======================== */
.form-feedback {
  display: none;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-feedback.success {
  display: block;
  background: rgba(16, 163, 74, 0.1);
  color: #065f46;
}

.form-feedback.error {
  display: block;
  background: rgba(220, 38, 38, 0.1);
  color: #7f1d1d;
}

/* ========================
   SERVICES
   ======================== */
.services-section {
  padding: 90px 60px;
  text-align: center;
}

.services-section h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: #ffffff;
  padding: 34px 26px;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.1);
}

/* ========================
   CALCULATOR
   ======================== */
.calculator-section {
  padding: 90px 20px;
  text-align: center;
}

/* 🔑 SCROLL FIX */
#loan-calculator {
  scroll-margin-top: 110px;
}

.calculator-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.05);
  text-align: left;
}

.calc-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.calc-tab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  background: #e5e7eb;
}

.calc-tab.active {
  background: linear-gradient(90deg, var(--brand-green-1), var(--brand-green-2));
  color: #ffffff;
}

.calc-content {
  display: none;
}

.calc-content.active {
  display: block;
}

.calc-content label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
}

.calc-content input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

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

/* ========================
   CALCULATOR RESULT
   ======================== */
.calculator-result {
  margin-top: 16px;
  background: #ffffff;
  border-radius: 10px;
  padding: 14px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.result-value {
  font-weight: 700;
  color: var(--brand-green-1);
}

/* ========================
   PARTNERS
   ======================== */
.partners {
  padding: 80px 40px;
  text-align: center;
}

.logo-slider img {
  height: 56px;
  margin: 14px;
  transition: transform 0.3s ease;
}

.logo-slider img:hover {
  transform: translateY(-6px) scale(1.05);
}

/* ========================
   CONTACT
   ======================== */
.contact {
  padding: 60px 20px;
  text-align: center;
}

.contact p {
  margin: 10px 0;
}

.contact i {
  margin-right: 8px;
  color: var(--brand-green-1);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
  .navbar {
    padding: 16px 20px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .calc-row {
    grid-template-columns: 1fr;
  }

  .cta-btn {
    width: 100%;
    max-width: 320px;
  }
}
