/* =========================================================
   MahaFind – Advanced Pincode Search: Green Premium Theme
   Matches home-3d.css design system exactly.
   ========================================================= */

/* ─── Page Base ─── */
.adv-search-page {
    background: var(--h3d-primary-bg, #f0faf4);
}

/* ─── Hero Section ─── */
.adv-search-page .hero-section {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 45%, #22c55e 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%);
    margin-bottom: -3rem;
    color: #fff;
    isolation: isolate;
}

/* Animated orbs */
.adv-search-page .hero-section::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    animation: adv-orb 8s ease-in-out infinite;
    pointer-events: none;
}
.adv-search-page .hero-section::after {
    content: '';
    position: absolute;
    bottom: -120px; left: -80px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    animation: adv-orb 10s ease-in-out infinite reverse;
    pointer-events: none;
}
@keyframes adv-orb {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-30px) scale(1.08); }
}

/* Grid overlay */
.adv-search-page .hero-section::before {
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    border-radius: 0;
    animation: none;
    inset: 0;
    width: auto;
    height: auto;
    top: 0; right: 0; bottom: 0; left: 0;
}

.adv-search-page .hero-section h1 {
    text-shadow: 0 4px 24px rgba(0,0,0,0.15);
    font-weight: 900;
    line-height: 1.15;
}
.adv-search-page .hero-section .lead {
    color: rgba(255,255,255,0.88);
    text-shadow: none;
}

/* ─── Search Card ─── */
.adv-search-page .search-section {
    position: relative;
    z-index: 10;
}

.adv-search-page .search-section .card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(22,163,74,0.12);
    box-shadow: 0 24px 80px rgba(22,163,74,0.20), 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-40px);
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s ease;
}

.adv-search-page .search-section .card:hover {
    transform: translateY(-46px);
    box-shadow: 0 30px 100px rgba(22,163,74,0.28), 0 12px 40px rgba(0,0,0,0.10);
}

/* Form inputs */
.adv-search-page .form-control,
.adv-search-page .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: #fafbfc;
    color: #1e293b;
    transition: all 0.25s ease;
}

.adv-search-page .form-control:focus,
.adv-search-page .form-select:focus {
    border-color: #16a34a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(22,163,74,0.12);
    transform: translateY(-1px);
}

/* Labels */
.adv-search-page .form-label.fw-semibold {
    color: #334155;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Submit Button */
.adv-search-page #advSearchSubmit {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 14px;
    padding: 0.9rem 2.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(22,163,74,0.38);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.adv-search-page #advSearchSubmit::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 ease;
}
.adv-search-page #advSearchSubmit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(22,163,74,0.50);
}
.adv-search-page #advSearchSubmit:hover::before { left: 100%; }
.adv-search-page #advSearchSubmit:active {
    transform: translateY(1px);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.15);
}

/* Filter toggle */
.adv-search-page #advFilterToggle {
    background: #f0faf4;
    border: 1.5px solid rgba(22,163,74,0.25);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    color: #16a34a;
    transition: all 0.3s ease;
}
.adv-search-page #advFilterToggle:hover {
    background: #dcfce7;
    box-shadow: 0 4px 12px rgba(22,163,74,0.15);
    transform: translateY(-1px);
}

/* Advanced filter panel */
.adv-search-page .location-hierarchy .card {
    background: #f0faf4 !important;
    border: 1px solid rgba(22,163,74,0.15) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ─── Results Section ─── */
.adv-search-page .results-section {
    position: relative;
}
.adv-search-page .results-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 50px; height: 3px;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 3px;
}
.adv-search-page .results-section h3 {
    position: relative;
}

/* Table */
.adv-search-page .table-responsive {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    background: #fff;
    overflow: hidden;
}
.adv-search-page .table thead th {
    background: linear-gradient(135deg, #14532d 0%, #15803d 100%);
    color: #fff;
    border: none;
    padding: 1rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.adv-search-page .table tbody tr {
    transition: all 0.22s ease;
    border-left: 3px solid transparent;
}
.adv-search-page .table tbody tr:hover {
    background-color: #f0faf4;
    border-left-color: #16a34a;
}

/* Mobile Cards */
.adv-search-page .result-card {
    border-radius: 18px;
    border: 1px solid rgba(22,163,74,0.1) !important;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    transition: all 0.35s ease;
    overflow: hidden;
    position: relative;
}
.adv-search-page .result-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, #16a34a, #22c55e);
    border-radius: 4px 0 0 4px;
}
.adv-search-page .result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(22,163,74,0.20);
    border-color: rgba(22,163,74,0.25) !important;
}

/* Buttons */
.adv-search-page .btn-outline-primary {
    border-color: #16a34a;
    color: #16a34a;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.25s ease;
}
.adv-search-page .btn-outline-primary:hover {
    background: #16a34a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}
.adv-search-page .badge.bg-primary {
    background: #16a34a !important;
}

/* ─── Feature Cards ─── */
.adv-search-page .features-section {
    background: linear-gradient(135deg, #f0faf4 0%, #dcfce7 100%);
}
.adv-search-page .feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.2rem 1.8rem;
    border: 1px solid rgba(22,163,74,0.12);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    overflow: hidden;
}
.adv-search-page .feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 20px 20px 0 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.adv-search-page .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(22,163,74,0.22);
}
.adv-search-page .feature-card:hover::before { transform: scaleX(1); }
.adv-search-page .feature-card i.fa-3x {
    width: 72px; height: 72px;
    line-height: 72px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    color: #16a34a;
    box-shadow: 0 8px 24px rgba(22,163,74,0.20);
    transition: all 0.35s ease;
}
.adv-search-page .feature-card:hover i.fa-3x {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    transform: scale(1.12) rotate(8deg);
    box-shadow: 0 12px 36px rgba(22,163,74,0.45);
}
.adv-search-page .feature-card h4 {
    font-weight: 800;
    color: #0f172a;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.adv-search-page .feature-card p {
    font-size: 0.87rem;
    color: #64748b;
    line-height: 1.65;
}

/* ─── Stats Cards (Database Statistics) ─── */
.adv-search-page .card.h-100 {
    border-radius: 16px;
    border: 1px solid rgba(22,163,74,0.12) !important;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.adv-search-page .card.h-100::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #16a34a, #22c55e);
}
.adv-search-page .card.h-100:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(22,163,74,0.18);
}
.adv-search-page .card.h-100 h3 {
    font-weight: 900;
    font-size: 1.9rem;
    color: #15803d;
}
.adv-search-page .card.h-100 .text-primary { color: #16a34a !important; }
.adv-search-page .card.h-100 .text-success { color: #22c55e !important; }

/* ─── SEO Section ─── */
.adv-search-page .seo-content-section .card {
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    border: 1px solid rgba(22,163,74,0.1);
}

/* ─── Results highlight animation ─── */
@keyframes adv-results-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(22,163,74,0.3); }
    70% { box-shadow: 0 0 0 15px rgba(22,163,74,0); }
    100%{ box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.adv-search-page .results-section.results-highlight {
    animation: adv-results-pulse 1.2s ease 1;
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .adv-search-page .hero-section {
        clip-path: none;
        padding: 80px 0 60px;
        margin-bottom: 0;
    }
    .adv-search-page .search-section .card {
        transform: none;
        margin-top: -1rem;
    }
    .adv-search-page .search-section .card:hover {
        transform: translateY(-3px);
    }
}
@media (max-width: 576px) {
    .adv-search-page .hero-section h1 {
        font-size: 1.9rem;
    }
    .adv-search-page .feature-card {
        padding: 1.5rem;
    }
}
