/* =============================================================================
   FINANCE PAGE STYLES
   Loanvana finance page - brand-aligned design
   ============================================================================= */

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.finance-hero {
  position: relative;
  min-height: 600px;
  background: linear-gradient(
    180deg,
    #1e40af 0%,
    #2563eb 15%,
    #3b82f6 30%,
    #60a5fa 45%,
    #93c5fd 60%,
    #bfdbfe 75%,
    #dbeafe 85%,
    #f0f9ff 93%,
    #ffffff 100%
  );
}

/* Navbar stays in hero, doesn't follow scroll */
.finance-hero #navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* =============================================================================
   DIRECTIONAL FLOW LINES
   Subtle flowing lines representing multiple lenders/options
   ============================================================================= */

.flow-lines-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Individual flow line - simple opaque white */
.flow-line {
  position: absolute;
  left: -50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 5%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.4) 95%,
    transparent 100%
  );
  animation: flowLine linear infinite;
}

/* Variation: slightly thicker accent lines */
.flow-line-accent {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 5%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.5) 95%,
    transparent 100%
  );
}

/* Line positions, widths, speeds - subtle diagonal drift */
.flow-line-1 {
  top: 12%;
  width: 60%;
  transform: rotate(-1deg);
  animation-duration: 25s;
  animation-delay: 0s;
}

.flow-line-2 {
  top: 22%;
  width: 45%;
  transform: rotate(-0.5deg);
  animation-duration: 20s;
  animation-delay: -5s;
}

.flow-line-3 {
  top: 32%;
  width: 70%;
  transform: rotate(-1.5deg);
  animation-duration: 30s;
  animation-delay: -10s;
}

.flow-line-4 {
  top: 42%;
  width: 55%;
  transform: rotate(-0.8deg);
  animation-duration: 22s;
  animation-delay: -3s;
}

.flow-line-5 {
  top: 52%;
  width: 65%;
  transform: rotate(-1.2deg);
  animation-duration: 28s;
  animation-delay: -15s;
}

.flow-line-6 {
  top: 62%;
  width: 50%;
  transform: rotate(-0.3deg);
  animation-duration: 24s;
  animation-delay: -8s;
}

/* Accent lines - slightly more visible, different layer */
.flow-line-7 {
  top: 18%;
  width: 40%;
  transform: rotate(-2deg);
  animation-duration: 18s;
  animation-delay: -12s;
}

.flow-line-8 {
  top: 38%;
  width: 35%;
  transform: rotate(-1.8deg);
  animation-duration: 16s;
  animation-delay: -6s;
}

.flow-line-9 {
  top: 48%;
  width: 50%;
  transform: rotate(-2.2deg);
  animation-duration: 20s;
  animation-delay: -2s;
}

.flow-line-10 {
  top: 58%;
  width: 42%;
  transform: rotate(-1.5deg);
  animation-duration: 19s;
  animation-delay: -9s;
}

/* Flow animation - smooth left to right drift */
@keyframes flowLine {
  0% {
    left: -70%;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

/* Fade lines out toward bottom */
.flow-lines-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
  pointer-events: none;
}

/* Reduced motion - show static lines */
@media (prefers-reduced-motion: reduce) {
  .flow-line {
    animation: none;
    left: 15%;
    opacity: 0.3;
  }
}

/* =============================================================================
   ANIMATED GRADIENT BAR
   ============================================================================= */

.gradient-bar-animated {
  width: 480px;
  max-width: 90%;
  height: 3px;
  margin: 0 auto 24px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    #f97316 0%,
    #fbbf24 25%,
    #ffffff 50%,
    #fbbf24 75%,
    #f97316 100%
  );
  background-size: 200% 100%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* =============================================================================
   FLUID CARD STACK
   Hover to expand cards, others compress
   ============================================================================= */

.fluid-card-stack {
  display: flex;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 380px;
}

.fluid-card {
  position: relative;
  flex: 0.4;
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: flex 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.08s,
              box-shadow 0.5s ease 0.08s,
              border-color 0.4s ease 0.08s,
              background 0.4s ease 0.08s;
}

/* First card expanded by default */
.fluid-card:first-child {
  flex: 3.5;
  background: #ffffff;
  border-radius: 20px;
  border-color: #f97316;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.1),
              0 4px 12px rgba(0, 0, 0, 0.04);
}

/* On hover, hovered card expands */
.fluid-card:hover {
  flex: 3.5;
  background: #ffffff;
  border-radius: 20px;
  border-color: #f97316;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.1),
              0 4px 12px rgba(0, 0, 0, 0.04);
}

/* When stack is hovered, collapse non-hovered cards including first */
.fluid-card-stack:hover .fluid-card:not(:hover) {
  flex: 0.4;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Gradient glow line on right edge */
.fluid-card::after {
  content: '';
  position: absolute;
  top: 12%;
  bottom: 12%;
  right: -1px;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    #3b82f6 15%,
    #60a5fa 30%,
    #f97316 50%,
    #60a5fa 70%,
    #3b82f6 85%,
    transparent 100%
  );
  opacity: 0.7;
  transition: opacity 0.4s ease;
  filter: blur(0.5px);
  border-radius: 2px;
}

/* Hide glow on expanded card and last card */
.fluid-card:first-child::after,
.fluid-card:hover::after,
.fluid-card:last-child::after {
  opacity: 0;
}

.fluid-card-stack:hover .fluid-card:not(:hover)::after {
  opacity: 0.7;
}

/* Card Header - icon at top, title moves to bottom when collapsed */
.fluid-card-header {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: padding 0.6s ease, flex 0.6s ease;
}

.fluid-card:first-child .fluid-card-header,
.fluid-card:hover .fluid-card-header {
  padding: 28px;
  flex: none;
}

.fluid-card-stack:hover .fluid-card:not(:hover) .fluid-card-header {
  flex: 1;
  padding: 16px;
}

.fluid-card-icon {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.fluid-card-icon i {
  color: #3b82f6;
  font-size: 1rem;
  transition: all 0.5s ease;
}

/* Active state icon - orange accent */
.fluid-card:first-child .fluid-card-icon,
.fluid-card:hover .fluid-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.fluid-card:first-child .fluid-card-icon i,
.fluid-card:hover .fluid-card-icon i {
  color: white;
  font-size: 1.35rem;
}

.fluid-card-stack:hover .fluid-card:not(:hover) .fluid-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  border-color: #dbeafe;
  box-shadow: none;
}

.fluid-card-stack:hover .fluid-card:not(:hover) .fluid-card-icon i {
  color: #3b82f6;
  font-size: 1rem;
}

.fluid-card-title {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0;
  margin-top: auto;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  opacity: 0.9;
  transition: opacity 0.2s ease 0.1s,
              font-size 0.5s ease 0.1s,
              color 0.4s ease 0.1s,
              margin-top 0.5s ease 0.1s;
}

.fluid-card:first-child .fluid-card-title,
.fluid-card:hover .fluid-card-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 20px;
  color: #1e293b;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  transform: rotate(0deg);
  opacity: 1;
}

.fluid-card-stack:hover .fluid-card:not(:hover) .fluid-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-top: auto;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  opacity: 0.9;
}

.fluid-card-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 8px;
  line-height: 1.4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease 0.1s, max-height 0.5s ease;
}

.fluid-card:first-child .fluid-card-subtitle,
.fluid-card:hover .fluid-card-subtitle {
  opacity: 1;
  max-height: 60px;
}

.fluid-card-stack:hover .fluid-card:not(:hover) .fluid-card-subtitle {
  opacity: 0;
  max-height: 0;
}

/* Card Content - Hidden until expanded */
.fluid-card-content {
  padding: 0 28px 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.6s ease 0.15s,
              padding 0.6s ease;
}

.fluid-card:first-child .fluid-card-content,
.fluid-card:hover .fluid-card-content {
  padding: 0 28px 28px;
  max-height: 400px;
  opacity: 1;
}

.fluid-card-stack:hover .fluid-card:not(:hover) .fluid-card-content {
  padding: 0 28px 0;
  max-height: 0;
  opacity: 0;
}

/* Content List */
.fluid-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fluid-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.9rem;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.fluid-card-list li:last-child {
  border-bottom: none;
}

.fluid-card-list .check-icon {
  width: 18px;
  height: 18px;
  background: #dbeafe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.fluid-card-list .check-icon i {
  color: #2563eb;
  font-size: 0.55rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .fluid-card-stack {
    flex-direction: column;
    gap: 16px;
    min-height: auto;
  }

  .fluid-card {
    flex: none !important;
  }

  .fluid-card-header {
    flex: none;
  }

  .fluid-card-title {
    margin-top: 20px;
    font-size: 1.25rem;
  }

  .fluid-card-content {
    max-height: none;
    opacity: 1;
    padding: 0 28px 28px;
  }

  .fluid-card-subtitle {
    opacity: 1;
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fluid-card,
  .fluid-card-header,
  .fluid-card-content,
  .fluid-card-subtitle,
  .fluid-card-title {
    transition: none;
  }

  .fluid-card-content {
    max-height: none;
    opacity: 1;
    padding: 0 28px 28px;
  }

  .fluid-card-subtitle {
    opacity: 1;
    max-height: none;
  }
}

/* =============================================================================
   ANALYSIS GEOMETRIC PATTERN
   ============================================================================= */

.analysis-geometric {
  position: relative;
  width: 280px;
  height: 280px;
}

.geo-grid {
  position: absolute;
  inset: 0;
}

.geo-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
  height: 1px;
}

.geo-line-1 {
  top: 30%;
  left: 10%;
  width: 80%;
}

.geo-line-2 {
  top: 50%;
  left: 5%;
  width: 90%;
}

.geo-line-3 {
  top: 70%;
  left: 15%;
  width: 70%;
}

.geo-circle {
  position: absolute;
  border: 1px solid #94a3b8;
  border-radius: 50%;
  opacity: 0.4;
}

.geo-circle-1 {
  width: 120px;
  height: 120px;
  top: 20%;
  left: 10%;
}

.geo-circle-2 {
  width: 80px;
  height: 80px;
  bottom: 15%;
  right: 15%;
}

.geo-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  opacity: 0.6;
}

.geo-dot-1 {
  top: 30%;
  left: 25%;
}

.geo-dot-2 {
  top: 50%;
  right: 30%;
}

.geo-dot-3 {
  bottom: 25%;
  left: 40%;
}

.geo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* =============================================================================
   PROGRAM HIGHLIGHTS GRID (Tier 2 - Light Scannable Section)
   ============================================================================= */

.program-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  max-width: 800px;
  margin: 0 auto;
}

.program-highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.95rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.program-highlight-item i {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.program-highlight-item span {
  line-height: 1.4;
}

/* Remove border from last items in each column */
.program-highlight-item:nth-last-child(-n+2) {
  border-bottom: none;
}

/* Responsive: stack to single column on mobile */
@media (max-width: 640px) {
  .program-highlights-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .program-highlight-item:last-child {
    border-bottom: none;
  }

  .program-highlight-item:nth-last-child(2) {
    border-bottom: 1px solid #f3f4f6;
  }
}
