:root { 
    --primary: #2563eb; 
    --primary-light: #eff6ff;
    --dark: #0f172a; 
    --text-gray: #64748b; 
    --border: #e2e8f0; 
    --white: #ffffff; 
    --bg: #f8fafc; 
}

body.resultados-page {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--dark);
    padding-top: 105px !important;
    margin: 0;
    font-size: 16px;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.resultados-page > .container {
    padding-bottom: clamp(56px, 8vw, 96px);
}

/* Navbar */
.navbar-top {
    position: fixed; top: 0; left: 0; right: 0; height: 75px;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); z-index: 1000;
    display: flex; align-items: center;
}
.nav-content { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 15px; }

.global-search { position: relative; flex: 1; max-width: 500px; }
.global-search input { 
    width: 100%; padding: 12px 15px 12px 45px; border-radius: 16px; 
    border: 1px solid var(--border); background: var(--white); outline: none; transition: 0.3s;
}
.global-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-gray); }

.view-buttons { display: flex; gap: 8px; background: #e2e8f0; padding: 4px; border-radius: 12px; }
.view-buttons button { 
    border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; 
    background: transparent; color: var(--text-gray); transition: 0.2s;
}
.view-buttons button.active { background: var(--white); color: var(--primary); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Grid e Layout Base */
.profiles-grid {
    display: grid;
    gap: 25px;
    margin-top: 20px;
    min-height: 200px;
    width: 100%;
    scroll-margin-top: 120px;
}

/* Modo Grade: Desktop (Padrão para telas maiores) */
.grid-mode {
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 1200px) {
    .grid-mode { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 900px) {
    .grid-mode { grid-template-columns: repeat(2, 1fr) !important; gap: 15px; }
}

@media (max-width: 480px) {
    .container { padding: 0 10px; }
    .grid-mode { gap: 10px; }
}

.profile-card {
    background: var(--white); border: 1px solid var(--border); border-radius: 24px;
    text-decoration: none; color: inherit; display: flex; transition: 0.3s; overflow: hidden;
    position: relative; width: 100%;
}
.profile-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }

.grid-mode .profile-card { flex-direction: column; text-align: center; }

/* Banner */
.profile-banner { height: 85px; width: 100%; background-size: cover; background-position: center; }

/* Foto de Perfil */
.profile-avatar { 
    width: 90px; 
    height: 90px; 
    border-radius: 25px; 
    border: 4px solid var(--white); 
    object-fit: cover; 
    background: var(--primary); 
    position: relative; 
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.grid-mode .profile-avatar { margin: -45px auto 10px; }

/* Ajustes Modo Lista */
.list-mode { grid-template-columns: 1fr !important; }
.list-mode .profile-card { flex-direction: row; align-items: center; padding: 15px; }
.list-mode .profile-banner { display: none; }
.list-mode .profile-avatar { margin: 0 20px 0 0; width: 65px; height: 65px; border-radius: 18px; border-width: 3px; }
.list-mode .profile-info { padding: 0; text-align: left; }

.profile-info { padding: 15px; flex: 1; }
.profile-info h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 2px 0; }
.profile-info p { color: var(--primary); font-size: 0.85rem; font-weight: 700; margin: 0 0 8px 0; }

.empty-state { grid-column: 1/-1; text-align: center; padding: 80px; color: var(--text-gray); }

@media (max-width: 768px) {
    body.resultados-page {
        padding-top: 142px !important;
    }

    .navbar-top {
        height: auto !important;
        min-height: 118px !important;
        padding: 10px 0 !important;
        align-items: flex-start !important;
    }

    .nav-content {
        display: grid !important;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }

    .global-search {
        grid-column: 1 / -1;
        grid-row: 2;
        order: 10;
        max-width: none;
        width: 100%;
    }

    .view-buttons {
        justify-self: end;
        width: auto !important;
    }

    .profile-info h3 { font-size: 1rem; }
    .profile-info p { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    body.resultados-page {
        padding-top: 154px !important;
    }

    .resultados-page > .container {
        padding-bottom: 72px;
    }

    .grid-mode .profile-avatar { width: 70px; height: 70px; margin: -35px auto 10px; }
    .profile-info h3 { font-size: 0.9rem; }
}
