/* Advanced Search Page – 3D & Premium Effects */

:root {
    --adv-primary: #667eea;
    --adv-secondary: #764ba2;
    --adv-accent: #00d2ff;
    --adv-bg-light: #f5f7fa;
    --adv-card-bg: #ffffff;
    --adv-text-main: #2d3748;
    --adv-text-muted: #718096;

    /* 3D Shadows */
    --adv-shadow-soft: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --adv-shadow-3d: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --adv-shadow-floating: 0 15px 35px rgba(102,126,234,0.2);
    --adv-shadow-glow: 0 0 40px rgba(102,126,234,0.15);
}

/* ─── Page Container ─── */
.adv-search-page {
    background: var(--adv-bg-light);
    perspective: 1200px;
}

/* ─── Hero Section 3D ─── */
.adv-search-page .hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0 90px;
    position: relative;
    overflow: visible;
    clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
    margin-bottom: -3rem;
}

.adv-search-page .hero-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
    animation: adv-hero-shimmer 15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes adv-hero-shimmer {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(5%, -5%) rotate(3deg); }
}

.adv-search-page .hero-section h1 {
    text-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transform: translateZ(20px);
    transform-style: preserve-3d;
}

.adv-search-page .hero-section .lead {
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.adv-search-page .search-section .card {
    background: var(--adv-card-bg);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: var(--adv-shadow-3d), var(--adv-shadow-glow);
    transform: translateY(-40px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
    backdrop-filter: blur(10px);
}

.adv-search-page .search-section .card:hover {
    transform: translateY(-45px);
    box-shadow: var(--adv-shadow-floating), 0 25px 50px rgba(0,0,0,0.12);
}

/* ─── 3D Neumorphic Inputs ─── */
.adv-search-page .form-control,
.adv-search-page .form-select {
    background-color: #f0f4f8;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 0.85rem 1.1rem;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.06),
                inset -2px -2px 5px rgba(255,255,255,0.9);
    transition: all 0.35s ease;
    font-weight: 500;
    color: var(--adv-text-main);
}

.adv-search-page .form-control:focus,
.adv-search-page .form-select:focus {
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.18),
                inset 1px 1px 3px rgba(0,0,0,0.04);
    border-color: var(--adv-primary);
    transform: translateY(-2px);
}

/* ─── 3D Submit Button ─── */
.adv-search-page #advSearchSubmit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    padding: 1rem 2.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    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.25), transparent);
    transition: left 0.5s ease;
}

.adv-search-page #advSearchSubmit:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(102,126,234,0.5);
}

.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.2);
}

/* ─── Advanced Filter Toggle ─── */
.adv-search-page #advFilterToggle {
    background: #fff;
    border: 1px solid rgba(102,126,234,0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.adv-search-page #advFilterToggle:hover {
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(102,126,234,0.15);
    transform: translateY(-2px);
}

/* ─── Results Section 3D ─── */
.adv-search-page .results-section {
    position: relative;
}

.adv-search-page .results-section h3 {
    position: relative;
}

.adv-search-page .results-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 60px; height: 3px;
    background: linear-gradient(135deg, var(--adv-primary), var(--adv-secondary));
    border-radius: 3px;
}

/* Desktop Table 3D */
.adv-search-page .table-responsive {
    border-radius: 16px;
    box-shadow: var(--adv-shadow-soft);
    background: #fff;
    overflow: hidden;
}

.adv-search-page .table thead th {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #fff;
    border: none;
    padding: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.adv-search-page .table tbody tr {
    transition: all 0.25s ease;
}

.adv-search-page .table tbody tr:hover {
    background-color: rgba(102,126,234,0.04);
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
}

/* Mobile Result Cards 3D */
.adv-search-page .result-card {
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.04);
    background: #fff;
    box-shadow: var(--adv-shadow-soft);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.adv-search-page .result-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--adv-primary), var(--adv-secondary));
    border-radius: 4px 0 0 4px;
}

.adv-search-page .result-card:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-6px);
    box-shadow: var(--adv-shadow-3d);
}

.adv-search-page .btn-outline-primary {
    border-radius: 10px;
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.adv-search-page .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* ─── Feature Cards 3D ─── */
.adv-search-page .features-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.adv-search-page .feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    border: none;
    box-shadow: var(--adv-shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.adv-search-page .feature-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--adv-primary), var(--adv-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.adv-search-page .feature-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    box-shadow: var(--adv-shadow-3d);
    z-index: 2;
}

.adv-search-page .feature-card:hover::after {
    transform: scaleX(1);
}

.adv-search-page .feature-card i.fa-3x {
    background: linear-gradient(135deg, #e0e7ff 0%, #f5f7fa 100%);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--adv-primary);
    box-shadow: inset 0 0 20px rgba(102,126,234,0.1);
    transition: all 0.4s ease;
}

.adv-search-page .feature-card:hover i.fa-3x {
    transform: scale(1.15) rotate(10deg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(102,126,234,0.3);
}

/* ─── Stats Cards 3D (Glassmorphism) ─── */
.adv-search-page .card.h-100 {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: all 0.35s ease;
    overflow: hidden;
    position: relative;
}

.adv-search-page .card.h-100::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--adv-primary), var(--adv-secondary), var(--adv-accent));
}

.adv-search-page .card.h-100:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 30px rgba(102,126,234,0.18);
}

.adv-search-page .card.h-100 h3 {
    font-weight: 800;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ─── SEO Content Section ─── */
.adv-search-page .seo-content-section .card {
    border-radius: 20px;
    box-shadow: var(--adv-shadow-soft);
}

/* ─── Scroll-to-Results Highlight ─── */
@keyframes adv-results-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(102,126,234,0.3); }
    70%  { box-shadow: 0 0 0 15px rgba(102,126,234,0); }
    100% { box-shadow: 0 0 0 0 rgba(102,126,234,0); }
}

.adv-search-page .results-section.results-highlight {
    animation: adv-results-pulse 1.2s ease 1;
}

/* ─── Responsive – Disable Heavy 3D on Mobile ─── */
@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: -1.5rem;
        border-radius: 18px;
    }

    .adv-search-page .search-section .card:hover {
        transform: translateY(-3px);
    }

    .adv-search-page .feature-card:hover {
        transform: translateY(-6px);
    }

    .adv-search-page .result-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 576px) {
    .adv-search-page .hero-section h1 {
        font-size: 1.8rem;
    }

    .adv-search-page .feature-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .adv-search-page .feature-card i.fa-3x {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 1.5rem !important;
    }
}
