/* Import Variables first */
@import url('variables.css');

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--gray-dark);
  /* background-color: #f6f9fc;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(20, 123, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(78, 168, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(20, 123, 255, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 15% 85%, rgba(78, 168, 255, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(20, 123, 255, 0.06) 0%, transparent 40%); */
  background-attachment: fixed;
  background-size: cover;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-sans);
  color: var(--dark-color);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
}

h1 {
  font-size: var(--font-size-hero-title);
}

h2 {
  font-size: var(--font-size-section-title);
}

p {
  color: var(--gray-medium);
  font-size: var(--font-size-body);
  margin-bottom: 1.5rem;
}

.text-muted-custom {
  color: var(--gray-medium) !important;
}

/* Section Spacing & Layout */
section {
  padding: 60px 0;
  position: relative;
}

.section-bg-gradient {
  /* background: linear-gradient(180deg, #F0F6FF 0%, #E6F1FE 100%); */
}

.container-premium {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Title Stylings */
.section-header {
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background-color: rgba(20, 123, 255, 0.08);
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-badge);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
}

.section-title {
  color: var(--dark-color);
  font-weight: var(--font-weight-bold);
  margin-bottom: 15px;
  position: relative;
}

.section-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Unified Section Sub-heading / Tagline Styling */
.section-subtitle,
.cibil-sub-headline,
.ai-sub-headline,
.dsa-sub-headline {
  font-family: var(--font-family-sans);
  font-size: 1.05rem !important;
  font-weight: 400 !important;
  color: #475569 !important;
  line-height: 1.65 !important;
  letter-spacing: normal;
  max-width: 660px;
  margin-top: 8px;
  margin-bottom: 28px;
}

.section-header.text-center .section-subtitle,
.text-center > .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.section-header.text-start .section-subtitle,
.text-start > .section-subtitle {
  margin-left: 0;
  margin-right: auto;
}

/* Button & Link Core styles */
a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-blue);
}

/* Base Scroll-Triggered Animations (AOS replacement) */
.reveal {
  position: relative;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-fade-up {
  transform: translateY(40px);
}

.reveal-fade-left {
  transform: translateX(-40px);
}

.reveal-fade-right {
  transform: translateX(40px);
}

.reveal-zoom {
  transform: scale(0.9);
}

/* Active states for triggers */
.reveal.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Micro animations */
.hover-scale {
  transition: var(--transition-smooth);
}

.hover-scale:hover {
  transform: scale(1.03);
}

.hover-lift {
  transition: var(--transition-bounce);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--radius-badge);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-medium);
}

/* Custom 5-Column Grid */
@media (min-width: 992px) {
  .col-lg-2-4 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* Infinite Scrolling Marquee */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 15px 0;
  display: flex;
  background-color: transparent;
}

.marquee-fade-left,
.marquee-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}

.marquee-fade-left {
  left: 0;
  background: linear-gradient(to right, #F8FAFC 0%, rgba(248, 250, 252, 0) 100%);
}

.marquee-fade-right {
  right: 0;
  background: linear-gradient(to left, #F8FAFC 0%, rgba(248, 250, 252, 0) 100%);
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  animation: scrollMarquee 35s linear infinite;
  padding: 8px 0;
}

.marquee-content:hover {
  animation-play-state: paused;
}

.marquee-card-item {
  flex-shrink: 0;
  width: 190px;
  height: 105px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.marquee-card-item:hover {
  transform: translateY(-4px);
  border-color: #BFDBFE;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.bank-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  width: 100%;
  height: 100%;
  gap: 0.35rem;
}

.bank-logo-wrap {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.marquee-bank-img {
  max-height: 45px;
  max-width: 145px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.bank-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  line-height: 1.2;
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   3-Step Lending Process Section
   ========================================================================== */
.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.step-image-wrapper {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:not(.step-card-middle) .step-image-wrapper {
  margin-bottom: 25px;
}

.step-card-middle .step-image-wrapper {
  margin-top: 25px;
}

.step-image-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(20, 123, 255, 0.12);
}

.step-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.badge-container {
  display: flex;
  justify-content: center;
}

.step-badge {
  background-color: var(--primary);
  color: var(--white);
  padding: 6px 20px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  display: inline-block;
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-top: 10px;
  margin-bottom: 12px;
}

.step-desc {
  font-size: var(--font-size-sm);
  color: var(--gray-medium);
  line-height: 1.6;
  max-width: 330px;
  margin: 0 auto;
}

/* Ensure step layout is responsive */
@media (max-width: 991px) {

  /* On tablets/mobiles, render middle column image on top like the others for visual hierarchy */
  .step-card-middle {
    flex-direction: column-reverse !important;
  }

  .step-card-middle .step-image-wrapper {
    margin-top: 0 !important;
    margin-bottom: 25px !important;
  }
}

/* ==========================================================================
   Site Preloader with Favicon 3D Flip Animation
   ========================================================================== */
.preloader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-wrapper.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.preloader-favicon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  animation: flipFavicon 1.2s infinite ease-in-out;
  perspective: 1000px;
  filter: drop-shadow(0 10px 25px rgba(20, 123, 255, 0.25));
}

@keyframes flipFavicon {
  0% {
    transform: perspective(400px) rotateY(0deg);
  }

  50% {
    transform: perspective(400px) rotateY(180deg);
  }

  100% {
    transform: perspective(400px) rotateY(360deg);
  }
}

.preloader-dots {
  display: flex;
  gap: 8px;
}

.preloader-dots span {
  width: 10px;
  height: 10px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: preloaderDotPulse 1.4s infinite ease-in-out both;
}

.preloader-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.preloader-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes preloaderDotPulse {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.3;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================================================
   Global Custom Card Design (Overrides Bootstrap .card)
   ========================================================================== */
.card {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 24px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}

.card-header .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
}
