/* styles.css */
/* Custom styles and animations for SalaryUdhar loan website */

/* Import Google Fonts as fallback (Tailwind already loaded, but for consistency) */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

/* Base resets & smooth behavior */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Color palette variables for custom uses */
:root {
    --primary: #133d66;
    --secondary: #68a74d;
    --primary-light: #1e5085;
    --secondary-light: #7fc05e;
}

/* Custom gradients using brand colors */
.hero-gradient {
    background: linear-gradient(135deg, #0e2e4d 0%, #133d66 40%, #1f5788 100%);
    position: relative;
}

/* Floating animation for hero icon */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Fade-up animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

/* Feature cards hover effects */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-light);
}

/* Step card styling */
.step-card {
    transition: all 0.25s ease-in-out;
    cursor: default;
}

.step-card:hover {
    transform: scale(1.02);
}

/* Buttons and interactive elements */
button,
a {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.96);
}

/* Custom scrollbar for modern look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* FAQ accordion custom transitions */
.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* enough for content */
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Input focus styles */
input:focus, 
button:focus {
    outline: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}

/* Loan calculator progress bar animation */
#calcProgress {
    transition: width 0.3s ease-out;
}

/* Testimonial cards animation on scroll (handled by Intersection Observer but base style) */
.testimonial-card {
    transition: all 0.5s ease-out;
}

.testimonial-card.animate-slide-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Additional hover glow for buttons and cards */
.bg-secondary {
    background-color: var(--secondary);
}

.bg-secondary:hover {
    background-color: var(--secondary-light);
    box-shadow: 0 10px 20px -5px rgba(104, 167, 77, 0.4);
}

.text-primary {
    color: var(--primary);
}

.border-primary {
    border-color: var(--primary);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .hero-gradient h1 {
        font-size: 2.25rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
}

/* Hover lift effect for cards globally */
.hover-lift {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.1);
}

/* Custom styles for step numbers */
.bg-primary {
    background-color: var(--primary);
}

/* soft ripple for CTA */
@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(104, 167, 77, 0.5);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(104, 167, 77, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(104, 167, 77, 0);
    }
}

#heroCtaBtn:hover {
    animation: softPulse 1s infinite;
}

/* footer links transition */
footer a:hover {
    color: var(--secondary);
    transition: color 0.2s;
}

/* additional gradient for selection */
::selection {
    background: var(--secondary);
    color: white;
}


/* ================= ANIMATIONS ================= */

/* Base hidden state */
.animate-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* Visible state */
.animate-section.show {
  opacity: 1;
  transform: translateY(0);
}

/* Left animation */
.animate-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s ease;
}

.animate-left.show {
  opacity: 1;
  transform: translateX(0);
}

/* Right animation */
.animate-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s ease;
}

.animate-right.show {
  opacity: 1;
  transform: translateX(0);
}

/* Scale animation */
.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
}

.animate-scale.show {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay utility */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }