/* People Page */
.people-page {
    padding: 0;
    max-width: 960px;
    margin: 0 auto;
}

/* Hero Section */
.people-hero {
    position: relative;
    text-align: center;
    padding: 64px 20px;
    color: white;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.people-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #302b63 50%, #24243e 100%);
    z-index: 0;
}

.people-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(102, 126, 234, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 60%);
    z-index: 1;
}

.people-hero-content {
    position: relative;
    z-index: 2;
}

.people-hero-content h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.people-hero-content p {
    font-size: 1.1rem;
    opacity: 0.75;
    max-width: 500px;
    margin: 0 auto;
}

/* Filters Card */
.filters-card {
    max-width: 1100px;
    margin: -24px auto 32px;
    background: white;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.filter-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.85rem;
}

.filter-group select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    width: 100%;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: white;
}

.filter-group input[type="text"] {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    width: 100%;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: white;
}

.filter-group-radius {
    max-width: 180px;
    min-width: 140px;
    flex: 0 1 auto;
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f5f5f5;
}

.autocomplete-item.empty-result {
    color: #999;
    font-style: italic;
    cursor: default;
    text-align: center;
    pointer-events: none;
}

.autocomplete-loader {
    display: none;
    padding: 16px;
    justify-content: center;
    align-items: center;
}

.autocomplete-loader.active {
    display: flex;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid var(--brand-primary);
    border-radius: 50%;
    animation: people-spin 0.6s linear infinite;
}

@keyframes people-spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    padding: 0 20px 48px;
}

.results-header {
    margin-bottom: 24px;
}

.results-header h2 {
    font-size: 1.4rem;
    color: #333;
    font-weight: 700;
}

.results-count {
    font-weight: 400;
    color: #999;
    font-size: 1rem;
}

/* Profiles Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* Profile Card Wrapper — ensures cards are equal height in the grid */
.profile-card-wrapper {
    display: flex;
    flex-direction: column;
}

/* Profile Card - full clickable link */
.profile-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f0f0f0;
    cursor: pointer;
}

.profile-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: #e0e3ff;
}

.profile-card:active {
    transform: translateY(-2px);
}

/* Card Top Section */
.card-top {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

/* Avatar */
.card-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    background: var(--brand-gradient);
}

/* Card Info */
.card-info {
    flex: 1;
    min-width: 0;
}

.card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-name-row h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #222;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.card-city {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #888;
}

/* Card Description */
.card-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Skills */
.card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.skill-tag {
    background: var(--brand-gradient);
    color: white;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.profile-card:hover .skill-tag {
    transform: scale(1.05);
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary);
    transition: gap 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-card:hover .card-link {
    gap: 8px;
}

.status-dot {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.status-dot.online {
    background: #dcfce7;
    color: #166534;
}

.status-dot.offline {
    background: #f3f4f6;
    color: #9ca3af;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 64px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 8px;
}

.no-results p {
    color: #888;
    margin-bottom: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--brand-primary);
    border: 2px solid #e5e7eb;
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    background: #f8f9ff;
}

/* Responsive */
@media (max-width: 768px) {
    .people-hero {
        padding: 48px 24px;
    }

    .people-hero h1 {
        font-size: 1.8rem;
    }

    .filters-card {
        margin: -16px 12px 24px;
        padding: 20px;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-group-radius {
        max-width: 100%;
    }

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

    .results-section {
        padding: 0 12px 32px;
    }
}

@media (max-width: 480px) {
    .card-top {
        flex-direction: column;
        text-align: center;
    }

    .card-name-row {
        justify-content: center;
    }

    .card-skills {
        justify-content: center;
    }
}
