/* ============================================
   SEARCH RESULTS & CARDS SYSTEM
   Unified styles for all search result grids
   ============================================ */

/* Import Global Design System */
@import url('./global-design-system.css');

/* Main Container */
.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-md);
    min-height: 80vh;
}

/* Page Header */
.search-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    position: relative;
}

.search-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    margin: 0;
    display: inline-block;
}

.search-header h1::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--color-red);
    margin: var(--space-sm) auto 0;
    border-radius: var(--radius-full);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

/* Search Form (Glassmorphic) */
.search-form {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-3xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Red accent line top of form */
.search-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-red), transparent);
}

.form-group {
    flex: 1 1 200px;
    /* Responsive flex grow */
    min-width: 200px;
}

.search-form input,
.search-form select {
    width: 100%;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-gray-600);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--color-white);
    transition: all var(--transition-base);
}

.search-form input:focus,
.search-form select:focus {
    outline: none;
    border-color: var(--color-red);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
}

.search-form button {
    flex: 0 0 auto;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-secondary);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.search-form button:hover {
    background: var(--color-red-light);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

/* ============================================
   RESULT CARDS GRID
   ============================================ */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-md) 0;
}

/* Card Component */
.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 0, 0, 0.1);
}

/* Card Header (Banner) */
.result-card-header {
    height: 100px;
    background: linear-gradient(135deg, #2a0a0a 0%, #1a0505 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 0, 0, 0.1);
}

.result-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: radial-gradient(circle at center, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
}

.occupation-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-red);
    font-size: var(--text-xs);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 0, 0, 0.3);
    text-transform: uppercase;
    font-weight: var(--font-bold);
    letter-spacing: 0.05em;
    z-index: 2;
}

/* Card Body */
.result-card-body {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    text-align: center;
    flex: 1;
    /* Pushes footer down */
    position: relative;
}

/* Profile Image */
.card-image-wrapper {
    width: 100px;
    height: 100px;
    margin: -65px auto var(--space-md);
    /* Creates visual overlap with header */
    position: relative;
    z-index: 5;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-black);
    /* Gap effect */
    box-shadow: 0 0 0 2px var(--color-red), 0 5px 15px rgba(0, 0, 0, 0.5);
    background: var(--color-black);
    transition: transform 0.3s ease;
}

.result-card:hover .card-image-wrapper img {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--color-white), 0 0 20px rgba(255, 0, 0, 0.4);
}

/* Typography */
.result-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-white);
    margin: 0 0 var(--space-xs);
    font-weight: var(--font-bold);
}

.designation {
    color: var(--color-red);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
    min-height: 1.2em;
    /* Prevent jump if empty */
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.info-item {
    color: var(--color-gray-300);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.info-item i {
    color: var(--color-red);
    font-size: 12px;
    width: 16px;
    /* Alignment */
}

/* Card Footer */
.result-card-footer {
    padding: 0 var(--space-lg) var(--space-lg);
    text-align: center;
}

.view-profile-btn {
    display: block;
    width: 100%;
    padding: var(--space-md);
    background: rgba(255, 0, 0, 0.1);
    color: var(--color-red);
    border: 1px solid var(--color-red);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.1em;
    transition: all var(--transition-base);
}

.view-profile-btn:hover {
    background: var(--color-red);
    color: var(--color-white);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .search-header h1 {
        font-size: var(--text-3xl);
    }

    .form-group {
        flex: 1 1 100%;
        /* Stack on mobile */
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}