/*
 * MahaFind Light Green Theme Override
 * Replaces dark purple/blue palette with a light mint-green theme.
 * This file is loaded last so it takes precedence over style.css / critical.min.css.
 */

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

:root {
    /* Primary green palette */
    --color-primary:          #16a34a;   /* green-600 */
    --color-primary-dark:     #15803d;   /* green-700 */
    --color-primary-light:    #22c55e;   /* green-500 */
    --color-primary-xlight:   #dcfce7;   /* green-100 */
    
    /* Missing variables causing gradients to break */
    --color-secondary:        #10b981;   /* emerald-500 */
    --color-accent:           #059669;   /* emerald-600 */

    /* Background & surface */
    --color-bg:               #f0faf4;   /* soft mint page bg */
    --color-bg-surface:       #e8f5ee;
    --color-bg-card:          #ffffff;
    --color-bg-deep:          #f0faf4;

    /* Text */
    --text-main:              #111827;
    --text-muted-custom:      #4b5563;
    --text-white:             #ffffff;

    /* Navigation */
    --nav-gradient:           linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    --nav-gradient-hover:     linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
    --nav-shadow:             0 8px 32px rgba(22, 163, 74, 0.3) !important;
    --nav-shadow-hover:       0 12px 40px rgba(22, 163, 74, 0.5) !important;

    /* Glass border */
    --glass-border:           rgba(22, 163, 74, 0.2);

    /* Bootstrap primary override */
    --bs-primary:             #16a34a;
    --bs-primary-rgb:         22, 163, 74;
    --bs-link-color:          #16a34a;
    --bs-link-hover-color:    #15803d;
}

/* ── Base body ── */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg) !important;
    color: var(--text-main) !important;
}

/* ── Bootstrap primary color overrides ── */
.btn-primary,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}
.btn-primary:hover {
    background-color: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(22, 163, 74, 0.4) !important;
}
.btn-outline-primary {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}
.badge.bg-primary, .bg-primary { background-color: var(--color-primary) !important; }
.text-primary { color: var(--color-primary) !important; }

/* ── Navbar ── */
.navbar-modern {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 8px 32px rgba(22, 163, 74, 0.3) !important;
}

/* ── Hero Section ── */
.hero-section {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Animated floating shapes for 3D hero effect */
.hero-section::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    animation: hero-float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-20px) scale(1.05); }
}

/* 3D hero shape top-left */
.hero-section::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    animation: hero-float 8s ease-in-out infinite reverse;
    pointer-events: none;
}

/* ── Cards ── */
.card {
    border-radius: 16px !important;
    border: 1px solid rgba(22, 163, 74, 0.12) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05) !important;
    background-color: #fff !important;
    color: var(--text-main) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: 0 8px 28px rgba(22, 163, 74, 0.15) !important;
    transform: translateY(-2px);
}
.card-header {
    background: linear-gradient(135deg, #f0faf4 0%, #dcfce7 100%) !important;
    border-bottom: 1px solid rgba(22, 163, 74, 0.15) !important;
    color: var(--text-main) !important;
    border-radius: 16px 16px 0 0 !important;
}

/* Force white text to dark for readability on white cards, but exclude buttons, badges, and icons */
.card *:not(.badge):not(.btn):not(i).text-white, 
.card *:not(.badge):not(.btn):not(i).text-white-50 {
    color: var(--text-muted-custom) !important;
}
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: var(--text-main) !important;
}

/* ── Features Section ── */
.features-section {
    background: linear-gradient(135deg, #f0faf4 0%, #dcfce7 100%) !important;
}
.feature-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(22, 163, 74, 0.15) !important;
    box-shadow: 0 5px 20px rgba(22, 163, 74, 0.08) !important;
    color: var(--text-main) !important;
}
.feature-card:hover {
    box-shadow: 0 15px 40px rgba(22, 163, 74, 0.2) !important;
}
.feature-card i, .feature-card h4 {
    color: var(--color-primary) !important;
}
.feature-card p {
    color: var(--text-muted-custom) !important;
}

/* ── IFSC/Search sections ── */
.ifsc-section, .ifsc-page .ifsc-section,
.knowledge-section, .seo-content-section {
    background: #f0faf4 !important;
}
.ifsc-page .ifsc-highlights {
    background: rgba(22, 163, 74, 0.1) !important;
    color: var(--color-primary) !important;
}

/* ── Sidebar cards ── */
.sidebar-card-3d {
    background: #ffffff !important;
    border: 1px solid rgba(22, 163, 74, 0.15) !important;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.08) !important;
    border-radius: 16px !important;
    color: var(--text-main) !important;
}
.sidebar-card-header-3d {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: #fff !important;
    border-radius: 16px 16px 0 0 !important;
}
.sidebar-icon-wrapper {
    background: rgba(255,255,255,0.2) !important;
}
.sidebar-card-header-3d h5 {
    color: #fff !important;
}

/* ── Stat items ── */
.stat-icon-3d.stat-primary { background: rgba(22,163,74,0.12) !important; color: var(--color-primary) !important; }
.stat-icon-3d.stat-success { background: rgba(22,163,74,0.12) !important; color: #166534 !important; }
.stat-icon-3d.stat-info    { background: rgba(14,165,233,0.12) !important; color: #0369a1 !important; }
.stat-icon-3d.stat-warning { background: rgba(245,158,11,0.12) !important; color: #b45309 !important; }
.stat-value-3d { color: var(--color-primary) !important; }
.stat-label-3d { color: var(--text-muted-custom) !important; }

/* ── Nearby items ── */
.nearby-item-3d { border-bottom: 1px solid rgba(22,163,74,0.1) !important; }
.nearby-item-3d:hover { background: rgba(22,163,74,0.05) !important; }
.nearby-item-arrow i { color: var(--color-primary) !important; }
.pincode-badge-3d {
    background: rgba(22,163,74,0.1) !important;
    color: var(--color-primary) !important;
    border: 1px solid rgba(22,163,74,0.2) !important;
}

/* ── Form controls ── */
.form-control:focus, .form-select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.25) !important;
}
.input-group-text { background: rgba(22,163,74,0.07) !important; border-color: rgba(22,163,74,0.2) !important; }

/* ── 3D Search form ── */
.form-control-3d {
    background: #f8fdf9 !important;
    border: 1.5px solid rgba(22,163,74,0.25) !important;
    color: var(--text-main) !important;
}
.form-control-3d:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15) !important;
}
.btn-3d-primary, .card .btn-3d-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(22,163,74,0.4) !important;
    border-radius: 12px !important;
}
.btn-3d-primary:hover, .card .btn-3d-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    box-shadow: 0 6px 20px rgba(22,163,74,0.5) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

/* ── Breadcrumbs ── */
.breadcrumb-item-3d a { color: var(--color-primary) !important; }
.breadcrumb-item-3d a:hover { background: rgba(22,163,74,0.1) !important; color: #15803d !important; }

/* ── Dropdown (Tools menu) ── */
.dropdown-item-3d:hover {
    background: linear-gradient(90deg, rgba(22,163,74,0.1) 0%, transparent 100%) !important;
    border-left-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}
.dropdown-item-3d i { color: var(--color-primary) !important; }
.dropdown-header-3d {
    color: var(--color-primary) !important;
    border-bottom-color: rgba(22,163,74,0.15) !important;
}
.dropdown-tools-column .dropdown-header-3d { border-bottom-color: rgba(22,163,74,0.2) !important; }

/* ── Footer ── */
footer.bg-dark {
    background: linear-gradient(135deg, #14532d 0%, #166534 100%) !important;
}
footer .text-muted { color: #bbf7d0 !important; }
footer a.text-muted:hover { color: #ffffff !important; }
footer h2, footer h3, footer h5, footer h6 { color: #fff !important; }
footer .h4.text-primary { color: #86efac !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar-thumb { background: var(--color-primary) !important; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary-dark) !important; }

/* ── Page states / alerts ── */
.alert-info {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    color: #166534 !important;
    border: 1px solid rgba(22,163,74,0.2) !important;
}

/* ── Table hover ── */
.table tbody tr:hover { background-color: rgba(22, 163, 74, 0.05) !important; }
.table thead { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important; color: #fff !important; }
.table-dark { background-color: var(--color-primary) !important; }

/* ── Badge adjustments ── */
.badge.bg-success { background-color: var(--color-primary) !important; }

/* ── 3D Metric tiles on IFSC hero ── */
.metric-tile.card {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    backdrop-filter: blur(12px) !important;
}
.metric-tile .metric-value { color: #fff !important; }
.metric-tile .metric-label  { color: rgba(255,255,255,0.8) !important; }

/* ── States & District page ── */
.knowledge-card {
    background: #ffffff !important;
    border: 1px solid rgba(22,163,74,0.15) !important;
    border-radius: 16px !important;
    color: var(--text-main) !important;
}

/* ── Search Tabs (homepage) ── */
.nav-tabs .nav-link.active {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
}
.nav-tabs .nav-link:hover {
    color: var(--color-primary) !important;
}

/* ── Mobile responsive ── */
@media (max-width: 991px) {
    .dropdown-item-3d { color: #fff !important; }
    .dropdown-item-3d:hover { background: rgba(255,255,255,0.2) !important; color: #fff !important; }
}
