/* =========================================================
   Modern UI overlay — glassmorphism, gradients, animations
   Loaded AFTER style.css + pages.css so it overrides cleanly
   ========================================================= */

:root {
  --grad-green: linear-gradient(135deg, #1f7a3a 0%, #0e5024 50%, #0a3d1c 100%);
  --grad-mesh:
    radial-gradient(at 20% 20%, rgba(31,122,58,.18), transparent 50%),
    radial-gradient(at 80% 30%, rgba(243,196,74,.15), transparent 50%),
    radial-gradient(at 60% 80%, rgba(31,122,58,.12), transparent 55%);
  --shadow-soft: 0 10px 40px -10px rgba(15, 80, 36, .15);
  --shadow-lift: 0 20px 50px -15px rgba(15, 80, 36, .25);
}

/* ---------- Body & smooth bg ---------- */
body {
  background: #fafdfb;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Glass Navbar ---------- */
.navbar.sticky-top {
  background: rgba(255,255,255,.78) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(231,236,232,.6);
  box-shadow: 0 1px 20px rgba(15,80,36,.04);
  transition: all .3s ease;
}
.navbar.scrolled { box-shadow: 0 6px 30px rgba(15,80,36,.08); }
.nav-link {
  position: relative;
  transition: color .25s ease;
}
.nav-link:not(.active)::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: -6px; height: 2px;
  background: var(--green-600); border-radius: 2px;
  transition: left .25s ease, right .25s ease;
}
.nav-link:hover::after { left: 15%; right: 15%; }
/* ---------- Dropdown chevron ---------- */
.dropdown-toggle::after { display: none; }
.nav-chevron {
  font-size: .65em;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  vertical-align: middle;
  opacity: .6;
}
.dropdown.show > .nav-link .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--green-600);
}

.helpline-icon {
  background: var(--grad-green);
  box-shadow: 0 6px 16px rgba(31,122,58,.35);
  transition: transform .3s;
}
.helpline-icon:hover { transform: rotate(-10deg) scale(1.05); }

/* ---------- Hero gradient mesh ---------- */
.hero-section {
  background: #fafdfb;
  background-image: var(--grad-mesh);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(31,122,58,.08), transparent 40%);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate(0,0); }
  100% { transform: translate(30px, -20px); }
}

.hero-section h1.display-3 {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #0f1d14 0%, #1a3322 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-section h1.display-3 .text-success {
  background: linear-gradient(135deg, #2a9c4a, #0e5024);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Coin / bag float anim */
.hero-section .col-lg-7::after {
  animation: floaty 5s ease-in-out infinite;
  filter: drop-shadow(0 25px 30px rgba(0,0,0,.15));
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ---------- Charge box modernized ---------- */
.charge-box {
  background: linear-gradient(135deg, rgba(234,246,238,.95), rgba(255,255,255,.6));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(184,214,194,.6);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.charge-box::after {
  content: ""; position: absolute; top: -50%; right: -20%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(243,196,74,.25), transparent 70%);
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.btn-success {
  background: var(--grad-green);
  border: none;
  box-shadow: 0 8px 18px rgba(31,122,58,.28);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(31,122,58,.4);
  background: var(--grad-green);
}
.btn-warning {
  background: linear-gradient(135deg, #ffd84a, #f0a800);
  border: none;
  color: #2a1a00;
  box-shadow: 0 8px 18px rgba(240,168,0,.3);
}
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(240,168,0,.4); }
.btn-outline-secondary { border-radius: 10px; }
.btn-apply {
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  transition: transform .25s, box-shadow .25s, filter .2s;
}
.btn-apply:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Sheen sweep on primary CTAs */
.btn-success::before, .btn-warning::before {
  content: ""; position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
  pointer-events: none;
}
.btn-success:hover::before, .btn-warning:hover::before { left: 130%; }

/* ---------- Apply Card ---------- */
.apply-card {
  border-radius: 22px;
  border: 1px solid rgba(231,236,232,.8);
  box-shadow: 0 30px 60px -20px rgba(15,80,36,.2);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}
.apply-header { background: var(--grad-green); }
.apply-card .form-control, .apply-card .form-select {
  border-radius: 10px; transition: all .25s;
}
.apply-card .form-control:focus, .apply-card .form-select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(31,122,58,.12);
}

/* ---------- Trust strip ---------- */
.trust-strip { background: #fff; }
.trust-ico {
  background: var(--green-50);
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; transition: transform .3s, background .3s;
}
.trust-strip .col-6:hover .trust-ico {
  background: var(--green-600); color: #fff; transform: rotate(-6deg) scale(1.05);
}

/* ---------- Section title ---------- */
.section-title {
  position: relative;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}
.section-title::before, .section-title::after {
  height: 2px;
}

/* ---------- Loan cards ---------- */
.loan-card {
  border-radius: 18px;
  border: 1px solid rgba(231,236,232,.8);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8f5 100%);
  position: relative;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.loan-card::before {
  content: ""; position: absolute; top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(31,122,58,.08), transparent 40%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.loan-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }
.loan-card:hover::before { opacity: 1; }
.loan-ico {
  width: 80px; height: 80px;
  box-shadow: 0 12px 24px -6px rgba(0,0,0,.18);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.loan-card:hover .loan-ico { transform: rotate(-8deg) scale(1.08); }

/* ---------- Panel card ---------- */
.panel-card {
  background: #fff;
  border: 1px solid rgba(231,236,232,.7);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.step-circle {
  background: linear-gradient(135deg, #eaf6ee, #d6ebde);
  border: 2px solid #d0e3d6;
  transition: transform .3s;
}
.step:hover .step-circle { transform: translateY(-4px) scale(1.05); }
.step-num {
  background: var(--grad-green);
  box-shadow: 0 4px 10px rgba(31,122,58,.4);
}

/* ---------- EMI result card ---------- */
.emi-result { border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(231,236,232,.6); }
.emi-result-head {
  background: linear-gradient(90deg, var(--green-50), #fff, var(--green-50));
  letter-spacing: .12em;
}
.emi-result h2 {
  background: linear-gradient(135deg, #2a9c4a, #0e5024);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    linear-gradient(135deg, rgba(14,80,36,.92), rgba(31,122,58,.85)),
    radial-gradient(circle at 70% 30%, rgba(243,196,74,.3), transparent 50%);
  padding: 80px 0 !important;
  position: relative;
  overflow: hidden;
}
.page-hero::before, .page-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.page-hero::before { width: 300px; height: 300px; top: -100px; left: -100px; animation: blob 14s ease-in-out infinite; }
.page-hero::after  { width: 220px; height: 220px; bottom: -80px; right: -60px; animation: blob 18s ease-in-out infinite reverse; }
@keyframes blob {
  0%, 100% { transform: scale(1) translate(0,0); }
  50%      { transform: scale(1.2) translate(20px, -15px); }
}
.page-hero h1 {
  background: linear-gradient(180deg, #ffffff 0%, #d8eede 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(2rem, 5vw, 3.4rem) !important;
}

/* ---------- Loan hero (detail pages) ---------- */
.loan-hero {
  background:
    linear-gradient(135deg, #eaf6ee 0%, #fafdfb 70%);
  position: relative; overflow: hidden;
}
.loan-hero::before {
  content: ""; position: absolute; top: 10%; right: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31,122,58,.08), transparent 60%);
  animation: blob 20s ease-in-out infinite;
}
.loan-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.02em;
}
.loan-hero .icon-circle {
  position: relative;
  animation: floaty 6s ease-in-out infinite;
}
.loan-hero .icon-circle::after {
  content: ""; position: absolute; inset: -10px;
  border-radius: 50%; border: 2px dashed rgba(31,122,58,.25);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Feature tiles ---------- */
.feature-tile {
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fafdfb 100%);
  position: relative;
  overflow: hidden;
}
.feature-tile::before {
  content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 0;
  background: var(--grad-green); transition: height .35s ease;
}
.feature-tile:hover::before { height: 100%; }
.feature-tile .ico {
  background: linear-gradient(135deg, #eaf6ee, #d6ebde);
  transition: transform .3s;
}
.feature-tile:hover .ico { transform: rotate(-6deg) scale(1.08); }

/* ---------- Stat cards ---------- */
.stat-card {
  background: var(--grad-green);
  border-radius: 18px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.stat-card::before {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(243,196,74,.18);
}
.stat-card .num {
  background: linear-gradient(180deg, #ffffff, #ffe9a8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Contact cards ---------- */
.contact-card { border-radius: 18px; transition: all .35s; }
.contact-card:hover .ico-big { background: var(--grad-green); color: #fff; }
.contact-card .ico-big { transition: all .35s; }

/* ---------- FAQ ---------- */
.faq-accordion .accordion-item {
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
  transition: box-shadow .25s;
}
.faq-accordion .accordion-item:hover { box-shadow: 0 8px 20px rgba(15,80,36,.08); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--grad-green);
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ""; position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(243,196,74,.18), transparent 60%);
  animation: blob 16s ease-in-out infinite;
}

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, #0f1d14 0%, #07120a 100%);
  position: relative;
}
.footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31,122,58,.5), transparent);
}

/* ---------- Float WA enhance ---------- */
.float-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 10px 30px rgba(37, 211, 102, .5);
}

/* ---------- AOS fallback ---------- */
[data-aos] { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }
[data-aos="fade-right"] { transform: translateX(-30px); }
[data-aos="fade-left"]  { transform: translateX(30px); }
[data-aos="fade-right"].aos-animate, [data-aos="fade-left"].aos-animate { transform: translateX(0); }
[data-aos="zoom-in"] { transform: scale(.92); }
[data-aos="zoom-in"].aos-animate { transform: scale(1); }

/* ---------- Counter (about stats) ---------- */
.stat-card .num { display: inline-block; }

/* ---------- Mobile fine-tune ---------- */
@media (max-width: 767px) {
  .page-hero { padding: 50px 0 !important; }
  .loan-hero .icon-circle::after { inset: -6px; }
}
