/* ==========================================================
   LOANS PAGE — EDITORIAL REDESIGN
   Matches About/Contact aesthetic: dark hero, editorial intro,
   numbered loan grid with gradient fills.
   ========================================================== */

/* ============ PAGE HERO — DARK GRADIENT MESH ============ */
.loans-hero {
  position: relative;
  padding: 140px 0 180px;
  text-align: center;
  overflow: hidden;
  background: #0a0e27;
  isolation: isolate;
}

.loans-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(0, 51, 160, 0.55), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(242, 101, 34, 0.45), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.4), transparent 45%),
    radial-gradient(circle at 25% 90%, rgba(0, 194, 255, 0.35), transparent 45%);
  z-index: -2;
  animation: loansMesh 20s ease-in-out infinite alternate;
}
@keyframes loansMesh {
  0%   { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.15) rotate(4deg); }
}

.loans-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  background: rgba(242, 101, 34, 0.15);
  border: 1px solid rgba(242, 101, 34, 0.4);
  color: #ffb88c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 26px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}
.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F26522;
  box-shadow: 0 0 12px #F26522;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.7; }
}

.loans-hero h1 {
  font-family: var(--font-secondary);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 26px;
  letter-spacing: -0.045em;
  line-height: 0.95;
  position: relative;
  display: inline-block;
  z-index: 2;
}
.loans-hero h1::after {
  content: '';
  display: block;
  width: 120px;
  height: 5px;
  margin: 26px auto 0;
  background: linear-gradient(135deg, #F26522, #ff8534);
  border-radius: 3px;
  box-shadow: 0 8px 30px rgba(242, 101, 34, 0.6);
}

.hero-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 26px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  z-index: 2;
}
.breadcrumb a { color: #ffb88c; font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .current { color: #ffffff; font-weight: 600; }

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1;
}
.hero-wave path { fill: #ffffff; }

/* ============ INTRO SECTION — MAGAZINE SPLIT ============ */
.intro-section {
  padding: 130px 0 100px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.intro-section::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.06), transparent 70%);
  border-radius: 50%;
  animation: floatSlow 12s ease-in-out infinite;
  pointer-events: none;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 90px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.intro-text h2 {
  font-family: var(--font-secondary);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 800;
  color: #0b1b3a;
  line-height: 1.08;
  margin-bottom: 30px;
  letter-spacing: -0.035em;
}
.intro-text h2::before {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0033A0, #00C2FF);
  border-radius: 2px;
  margin-bottom: 24px;
}

.intro-text p {
  font-size: 17px;
  line-height: 1.85;
  color: #4a5a72;
  margin-bottom: 24px;
}
.intro-text p:last-child { margin-bottom: 0; }

/* Arrow-style sub-heading */
.sub-heading.arrow-left {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #0033A0;
  text-transform: uppercase;
  margin-bottom: 22px;
  padding-left: 55px;
  position: relative;
}
.sub-heading.arrow-left::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 2px;
  background: linear-gradient(90deg, #0033A0, transparent);
}

/* ---------- Right column: checklist in editorial style ---------- */
.intro-features {
  padding-top: 50px;
  position: relative;
}

/* Big decorative number behind */
.intro-features::before {
  content: '07';
  position: absolute;
  top: 20px;
  right: 0;
  font-family: var(--font-secondary);
  font-size: 180px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #0033A0 20%, #00C2FF 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.06em;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.feature-checks {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.feature-checks li {
  position: relative;
  padding: 20px 20px 20px 60px;
  font-size: 16px;
  font-weight: 600;
  color: #0b1b3a;
  border-bottom: 1px solid #e5e9f0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 10px;
}
.feature-checks li:first-child { padding-top: 16px; }
.feature-checks li:last-child { border-bottom: none; }

/* Circle checkmark */
.feature-checks li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0033A0, #1a4db3);
  border-radius: 50%;
  box-shadow: 0 6px 15px -3px rgba(0, 51, 160, 0.5);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-checks li::after {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  z-index: 1;
}

.feature-checks li:hover {
  color: #0033A0;
  background: rgba(0, 51, 160, 0.04);
  padding-left: 66px;
  transform: translateX(6px);
}

.feature-checks li:hover::before {
  transform: translateY(-50%) scale(1.15) rotate(-10deg);
  background: linear-gradient(135deg, #F26522, #ff8534);
  box-shadow: 0 8px 20px -3px rgba(242, 101, 34, 0.5);
}

/* ============ LOAN CARDS — EDITORIAL NUMBERED GRID ============ */
.loan-services {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  padding: 60px 0 130px;
  position: relative;
  overflow: hidden;
}

.loan-services::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 51, 160, 0.05), transparent 65%);
  border-radius: 50%;
  animation: float 14s ease-in-out infinite;
  pointer-events: none;
}

.section-heading {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 70px;
  position: relative;
  z-index: 1;
}
.section-heading .sub-heading {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #F26522;
  background: rgba(242, 101, 34, 0.1);
  border: 1px solid rgba(242, 101, 34, 0.2);
  padding: 8px 20px;
  border-radius: 40px;
  margin-bottom: 20px;
}
.section-heading h2 {
  font-family: var(--font-secondary);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  color: #0b1b3a;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

/* ============ GRID ============ */
.loan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  perspective: 1500px;
  position: relative;
  z-index: 1;
  counter-reset: loan-counter;
}

/* ---------- LOAN CARD — editorial version ---------- */
.loan-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 24px;
  padding: 44px 28px 36px;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  counter-increment: loan-counter;
}

/* Big decorative number in the top-right */
.loan-card::after {
  content: counter(loan-counter, decimal-leading-zero);
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-secondary);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(0, 51, 160, 0.06);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 0;
}

/* Top gradient line */
.loan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0033A0, #F26522, #00C2FF);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.loan-card:hover::before { transform: scaleX(1); }

.loan-card:hover::after {
  color: rgba(242, 101, 34, 0.15);
  transform: scale(1.1) rotate(-6deg);
}

/* Inner glow */
.loan-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle,
    rgba(0, 51, 160, 0.08),
    transparent 45%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.loan-card:hover .loan-card-glow { opacity: 1; }

.loan-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 40px 80px -20px rgba(0, 51, 160, 0.25),
    0 15px 40px -10px rgba(0, 51, 160, 0.15);
  border-color: transparent;
}

/* ---------- Icon ---------- */
.loan-icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0, 51, 160, 0.08), rgba(0, 194, 255, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.loan-icon i {
  font-size: 28px;
  color: #0033A0;
  transition: all 0.4s ease;
}

.loan-card:hover .loan-icon {
  background: linear-gradient(135deg, #0033A0, #1a4db3);
  border-radius: 50%;
  transform: translateY(-4px) rotate(-10deg) scale(1.08);
  box-shadow: 0 20px 40px -10px rgba(0, 51, 160, 0.5);
}

.loan-card:hover .loan-icon i {
  color: #ffffff;
  transform: scale(1.05);
}

/* ---------- Title ---------- */
.loan-card h4 {
  font-family: var(--font-secondary);
  font-size: 22px;
  font-weight: 800;
  color: #0b1b3a;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.loan-card:hover h4 { color: #0033A0; }

/* ---------- Description ---------- */
.loan-card p {
  font-size: 14.5px;
  color: #4a5a72;
  line-height: 1.7;
  margin-bottom: 26px;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

/* ---------- Apply link ---------- */
.apply-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0033A0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  padding: 9px 18px;
  border-radius: 50px;
  background: rgba(0, 51, 160, 0.06);
  border: 1px solid rgba(0, 51, 160, 0.1);
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apply-link i {
  font-size: 11px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loan-card:hover .apply-link {
  color: #ffffff;
  background: linear-gradient(135deg, #F26522, #ff8534);
  border-color: transparent;
  box-shadow: 0 12px 25px -6px rgba(242, 101, 34, 0.5);
}

.loan-card:hover .apply-link i {
  transform: translateX(4px);
}

/* ============ ANIMATIONS ============ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-24px); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .loan-grid { gap: 20px; }
  .loan-card { padding: 38px 24px 32px; }
  .loan-icon { width: 64px; height: 64px; border-radius: 20px; }
  .loan-icon i { font-size: 24px; }
  .loan-card::after { font-size: 56px; top: 16px; right: 20px; }
}

@media (max-width: 1024px) {
  .loans-hero { padding: 110px 0 140px; }
  .intro-section { padding: 90px 0 80px; }
  .intro-text h2 { font-size: 36px; }
  .intro-grid { gap: 60px; }
  .loan-grid { grid-template-columns: repeat(3, 1fr); }
  .intro-features::before { font-size: 140px; }
}

@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .intro-features { padding-top: 0; }
  .intro-features::before { font-size: 120px; top: -20px; right: 20px; }
  .loan-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 767px) {
  .loans-hero { padding: 90px 0 110px; }
  .loans-hero h1 { font-size: 48px; }
  .loans-hero h1::after { width: 80px; height: 4px; margin-top: 20px; }
  .hero-subtitle { font-size: 16px; }

  .intro-section { padding: 70px 0 60px; }
  .intro-text h2 { font-size: 30px; }
  .intro-text p { font-size: 15.5px; }

  .feature-checks li { font-size: 15px; padding: 16px 16px 16px 54px; }
  .feature-checks li::before,
  .feature-checks li::after { left: 12px; width: 26px; height: 26px; }
  .feature-checks li::after { font-size: 13px; }
  .intro-features::before { font-size: 100px; top: -10px; right: 0; }

  .loan-services { padding: 50px 0 80px; }
  .loan-grid { grid-template-columns: 1fr; gap: 20px; }
  .loan-card { padding: 36px 26px 30px; border-radius: 22px; }
  .loan-icon { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 22px; }
  .loan-icon i { font-size: 24px; }
  .loan-card h4 { font-size: 20px; }
  .loan-card p { font-size: 14px; }
  .loan-card::after { font-size: 52px; top: 14px; right: 18px; }
}