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

body {
    font-family: 'Inter', sans-serif;
}

/* Hero Section Background - Force Green Gradient */
section.gradient-bg,
.gradient-bg,
section[class*="gradient-bg"] {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%) !important;
    background-color: #059669 !important;
    min-height: 600px !important;
    position: relative !important;
    overflow: hidden !important;
    color: #ffffff !important;
}

section.gradient-bg::before,
.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #065f46 0%, #059669 100%) !important;
    z-index: 0;
    pointer-events: none;
}

section.gradient-bg > *,
.gradient-bg > * {
    position: relative;
    z-index: 1;
}

/* Ensure text is visible in hero section */
.gradient-bg,
.gradient-bg * {
    color: #ffffff !important;
}

.gradient-bg h1,
.gradient-bg h2,
.gradient-bg h3,
.gradient-bg p,
.gradient-bg span,
.gradient-bg div,
.gradient-bg label {
    color: #ffffff !important;
}

/* Badge text */
.gradient-bg .bg-white\/20 span {
    color: #ffffff !important;
}

/* Ensure accent color is visible */
.gradient-bg .text-accent {
    color: #f59e0b !important;
}

/* Calculator labels and text */
.gradient-bg label,
.gradient-bg .text-sm,
.gradient-bg .text-xl {
    color: #ffffff !important;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.15);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #f59e0b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.stat-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #059669;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translate(0, 0px); }
    50% { transform: translate(0, 10px); }
    100% { transform: translate(0, -0px); }
}

/* Additional utility classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure Tailwind utilities work properly */
.text-primary {
    color: #059669;
}

.text-secondary {
    color: #10b981;
}

.text-accent {
    color: #f59e0b;
}

.bg-primary {
    background-color: #059669;
}

.bg-secondary {
    background-color: #10b981;
}

.bg-accent {
    background-color: #f59e0b;
}

.bg-light {
    background-color: #ecfdf5;
}

.bg-dark {
    background-color: #064e3b;
}

.text-muted {
    color: #6b7280;
}

/* Footer styles */
footer {
    background-color: #064e3b !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #10b981 !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #059669;
}

/* Search Section Optimization */
section.bg-white.border-b {
    background: #ffffff;
}

section.bg-white.border-b .bg-gradient-to-r {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}

/* Ensure background is visible */
body {
    background-color: #ffffff;
}

/* Additional override for Tailwind */
section[class*="gradient-bg"] {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%) !important;
    background-color: #059669 !important;
    background-image: linear-gradient(135deg, #065f46 0%, #059669 100%) !important;
}

/* Text truncation utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loan Reviews Page Styles */
.review-rating {
    display: inline-flex;
    align-items: center;
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #059669 !important;
    color: white !important;
}

.loan-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.loan-card {
    display: block;
}

.loan-card.hidden {
    display: none;
}

/* Icon color classes for loan cards */
.bg-primary-100 { background-color: rgba(5, 150, 105, 0.1); }
.bg-blue-100 { background-color: rgba(59, 130, 246, 0.1); }
.bg-green-100 { background-color: rgba(34, 197, 94, 0.1); }
.bg-purple-100 { background-color: rgba(168, 85, 247, 0.1); }
.bg-yellow-100 { background-color: rgba(234, 179, 8, 0.1); }
.bg-red-100 { background-color: rgba(239, 68, 68, 0.1); }
.bg-indigo-100 { background-color: rgba(99, 102, 241, 0.1); }
.bg-teal-100 { background-color: rgba(20, 184, 166, 0.1); }
.bg-orange-100 { background-color: rgba(249, 115, 22, 0.1); }

.text-primary-600 { color: #059669; }
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-purple-600 { color: #9333ea; }
.text-yellow-600 { color: #ca8a04; }
.text-red-600 { color: #dc2626; }
.text-indigo-600 { color: #4f46e5; }
.text-teal-600 { color: #0d9488; }
.text-orange-600 { color: #ea580c; }

/* Loan Detail Page Styles */
.prose {
    max-width: none;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sticky sidebar on desktop */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .gradient-bg {
        min-height: auto;
        padding: 3rem 0 !important;
    }
    
    section.bg-white.border-b .bg-gradient-to-r {
        padding: 1.5rem !important;
    }
    
    /* Loan detail page mobile adjustments */
    .flex-col.lg\:flex-row {
        flex-direction: column;
    }
    
    .lg\:w-96 {
        width: 100%;
    }
}

/* User dashboard refinements */
.user-dashboard {
    background-color: #f3f4f6;
}

.user-dashboard .dashboard-shell {
    background: linear-gradient(135deg, #0b1b2b, #102a43);
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
}

.user-dashboard .dashboard-shell::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -80px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 65%);
}

.user-dashboard .stat-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(15,118,110,0.15);
    box-shadow: 0 15px 35px rgba(15,118,110,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-dashboard .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 45px rgba(15,118,110,0.15);
}

.user-dashboard .form-card input,
.user-dashboard .form-card textarea,
.user-dashboard .form-card select {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
}

.user-dashboard .form-card input:focus,
.user-dashboard .form-card textarea:focus,
.user-dashboard .form-card select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
    background: #ffffff;
}

.user-dashboard .form-label {
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dashboard .form-label i {
    color: #10b981;
}

.user-dashboard .badge-pill {
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
}

.user-dashboard .activity-panel {
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.user-dashboard .timeline-item {
    position: relative;
    padding-left: 1.75rem;
}

.user-dashboard .timeline-item::before {
    content: '';
    position: absolute;
    left: 0.35rem;
    top: 0.2rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 8px 20px rgba(16,185,129,0.35);
}

.user-dashboard .timeline-item::after {
    content: '';
    position: absolute;
    left: 0.7rem;
    top: 1.1rem;
    bottom: -1.1rem;
    width: 2px;
    background: #e5e7eb;
}

.user-dashboard .timeline-item:last-child::after {
    display: none;
}
