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

:root {
  --container: 1100px;

  /* Light theme */
  --primary: #0057d8;
  --accent: #00bcd4;
  --muted: #6b7280;
  --surface: #ffffff;
  --bg: #f8fafc;
  --text: #1e293b;

  --radius: 12px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Dark theme overrides */
body.dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --accent: #06b6d4;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem;
}

/* Navbar */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.3rem;
  text-decoration: none;
}
.nav-actions .btn { font-size: 0.9rem; }

/* Buttons */
.btn {
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn.secondary {
  background: var(--accent);
  color: #fff;
}
.btn.secondary:hover { opacity: 0.9; }
.btn.outline {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
}
.btn.outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: var(--muted);
}
body.dark .btn.ghost {
  border-color: #475569;
  color: var(--muted);
}
body.dark .btn.outline {
  border-color: var(--primary);
  color: var(--primary);
}
/* Login Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.login-form label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.login-form input {
  padding: 0.7rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.login-form input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 87, 216, 0.2);
}

/* Actions (buttons inside modal) */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .modal-content {
    padding: 1.5rem 1rem;
    width: 95%;
  }

  .login-form input {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
    text-align: center;
  }
}

.card .desc {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.2;
}
.hero.container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;              /* adds spacing between left and right */
  flex-wrap: wrap;        /* so on small screens, it stacks */
  margin-top: 2rem;
}

.hero-left {
  flex: 1 1 50%;          /* takes half width on desktop */
  min-width: 320px;       /* prevents shrinking too much */
}

.hero-right {
  flex: 1 1 40%;          /* smaller column for cards */
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-right .card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: left;
}

.hero-right h3 {
  margin-bottom: 0.5rem;
}

.hero-right .desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}

/* Hero */
.site-header {
  background: linear-gradient(135deg, #e3f2fd, #f9fafb);
  border-bottom: 1px solid #e5e7eb;
}
body.dark .site-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-bottom: 1px solid #334155;
}
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 3rem 0;
}
.hero-left { flex: 1 1 50%; padding-right: 1rem; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.lead { color: var(--muted); margin-bottom: 1.5rem; }
.hero-right { flex: 1 1 40%; display: flex; flex-direction: column; gap: 1rem; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.card:hover { transform: translateY(-4px); }
.card h3 { margin: 0; font-size: 1.2rem; }
.card .amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.5rem 0 1rem;
}

/* Features */
.how-section { text-align: center; padding: 3rem 1rem; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.feature h3 { color: var(--primary); margin-bottom: 0.5rem; }

/* Steps */
.steps {
  margin: 2rem 0;
  padding-left: 1rem;
  counter-reset: step;
}
.steps li {
  list-style: none;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.steps li:before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Application Form */
.app-form {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.row label {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}
.row input, .row select {
  margin-top: 0.4rem;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
body.dark .row input, 
body.dark .row select {
  border: 1px solid #475569;
}

/* FAQs */
details {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow);
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: #0f2747;
  color: #cbd5e1;
  padding: 3rem 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}
body.dark .site-footer { background: #0a192f; color: #94a3b8; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin: 0.5rem 0; }
.footer-col ul li a {
  color: inherit;
  text-decoration: none;
}
.footer-col ul li a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
}
.footer-bottom .disclaimer {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
  animation: fadeIn 0.3s ease;
  color: var(--text);
}
.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Applications Table */
.app-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.app-table th, .app-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  color: var(--text);
}
.app-table th {
  background: var(--primary);
  color: #fff;
}
.app-table tr:hover { background: #f1f5f9; }
body.dark .app-table tr:hover { background: #1e293b; }

/* Toast */
.toast-message {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  font-size: 14px;
}
.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive - Mobile First */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.5;
  }

  .container {
    padding: 0.8rem;
  }

  /* Navbar */
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  .brand {
    font-size: 1.2rem;
  }
  .nav-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .nav-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  /* Hero */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
  }
  .hero-left, .hero-right {
    flex: 1 1 100%;
    padding: 0;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .lead {
    font-size: 0.95rem;
  }

  /* Cards */
  .card {
    padding: 1rem;
  }
  .card h3 {
    font-size: 1rem;
  }
  .card .amount {
    font-size: 1.5rem;
  }

  /* Features grid */
  .features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Steps */
  .steps li {
    font-size: 0.9rem;
    padding: 0.8rem;
  }

  /* Application Form */
  .app-form {
    padding: 1.2rem;
  }
  .row {
    flex-direction: column;
    gap: 0.6rem;
  }

  /* Table */
  .app-table th, .app-table td {
    padding: 0.6rem;
    font-size: 0.85rem;
  }
  .app-table {
    display: block;
    overflow-x: auto;
    border-radius: 8px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .footer-col h4 {
    font-size: 1rem;
  }
  .footer-col ul li {
    font-size: 0.9rem;
  }

  /* Modal */
  .modal-content {
    padding: 1.5rem;
    max-width: 90%;
  }

  /* Toast */
  .toast-message {
    width: 90%;
    right: 5%;
    bottom: 15px;
    font-size: 13px;
    text-align: center;
  }
}
/* Multi-Step Form Container */
.app-form {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 2rem auto;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease forwards;
}

/* Form Steps */
.form-step {
  display: none;
  animation: slideFade 0.5s ease forwards;
}
.form-step.active {
  display: block;
}

/* Step Header */
.form-step h3.full {
  grid-column: span 2;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
}

/* Labels & Inputs */
.form-step label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.form-step input,
.form-step select {
  margin-top: 6px;
  padding: 0.7rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s ease;
}
.form-step input:focus,
.form-step select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 87, 216, 0.2);
  transform: scale(1.02);
}

/* Full-width fields */
.form-step .full {
  grid-column: span 2;
}

/* Fieldsets */
fieldset {
  grid-column: span 2;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: box-shadow 0.3s ease;
}
fieldset:hover {
  box-shadow: 0 4px 15px rgba(0, 87, 216, 0.15);
}
fieldset legend {
  font-weight: 600;
  color: var(--primary);
}

/* Buttons row */
.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.actions .btn {
  min-width: 120px;
  margin: 5px 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Animations */
@keyframes slideFade {
  0% { opacity: 0; transform: translateX(50px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .app-form { padding: 1.2rem; }
  .form-step h3.full { font-size: 1.1rem; }
  .form-step input, .form-step select { font-size: 0.9rem; padding: 0.6rem; }
  .actions { flex-direction: column; gap: 0.5rem; }
}
/* ========================= */
/* Animations & Transitions  */
/* ========================= */

/* Smooth page load */
body {
  opacity: 0;
  animation: fadeInPage 0.8s ease forwards;
}
@keyframes fadeInPage {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero Section Animation */
.hero-left, .hero-right {
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 1s ease forwards;
}
.hero-left { animation-delay: 0.3s; }
.hero-right { animation-delay: 0.6s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Cards Hover Effect */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 87, 216, 0.25);
}

/* Buttons Ripple Effect */
.btn {
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}
.btn:active::after {
  width: 300%; height: 300%;
  transition: 0s;
}

/* Input focus animation */
input, select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
input:focus, select:focus {
  transform: scale(1.02);
  box-shadow: 0 0 8px rgba(0, 87, 216, 0.25);
}

/* Modal Pop Animation */
.modal-content {
  animation: popIn 0.4s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Section Fade-In on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Footer fade-in */
.site-footer {
  animation: fadeUp 1s ease forwards;
  opacity: 0;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
