/* Custom CSS for Tailwind-based loan website */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Root Variables */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Custom Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Form Focus States */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-500);
}

/* Form Input Text Color Fix */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    color: #1f2937 !important; /* Dark gray text */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    color: #111827 !important; /* Even darker on focus */
}

/* Placeholder color */
input::placeholder,
textarea::placeholder {
    color: #6b7280 !important; /* Medium gray for placeholders */
    opacity: 1;
}

/* Select dropdown options */
select option {
    color: #1f2937 !important;
    background-color: #ffffff !important;
}

/* Specific form styling for loan forms */
#homeLoanForm input,
#homeLoanForm select,
#personalLoanForm input,
#personalLoanForm select,
#businessLoanForm input,
#businessLoanForm select,
#carLoanForm input,
#carLoanForm select,
#educationLoanForm input,
#educationLoanForm select,
#lapLoanForm input,
#lapLoanForm select,
#goldLoanForm input,
#goldLoanForm select {
    color: #1f2937 !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
}

#homeLoanForm input:focus,
#homeLoanForm select:focus,
#personalLoanForm input:focus,
#personalLoanForm select:focus,
#businessLoanForm input:focus,
#businessLoanForm select:focus,
#carLoanForm input:focus,
#carLoanForm select:focus,
#educationLoanForm input:focus,
#educationLoanForm select:focus,
#lapLoanForm input:focus,
#lapLoanForm select:focus,
#goldLoanForm input:focus,
#goldLoanForm select:focus {
    color: #111827 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Custom Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Button Styles */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary-custom:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary-custom:hover:before {
    left: 100%;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-500);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-500);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll to Top Button - Override */
.scroll-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 9999 !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: scale(0.8) !important;
}

.scroll-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    transform: scale(1.1) translateY(-2px) !important;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4) !important;
}

.scroll-to-top:active {
    transform: scale(0.95) !important;
}

/* Mobile responsive scroll-to-top */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-500: #0056b3;
        --primary-600: #004494;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (if needed later) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        /* Dark mode styles can be added here */
    }
}
