/* ==========================================================================
   PROFILES SECTION - Trending Profiles & Scientists on ARI
   ========================================================================== */

/* ==========================================================================
   SMOOTH LOADING ANIMATIONS
   ========================================================================== */

/* Section elements - visible by default */
.profiles-section,
.section-header {
    opacity: 1;
    transform: translateY(0);
}

/* Profile grids - hidden initially for loading animation */
.profiles-grid-trending,
.profiles-grid-scientists-on-ari {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Profile cards - visible by default */
.profile-card {
    opacity: 1;
}

/* Loaded state - visible */
.text-loaded {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ==========================================================================
   PROFILES SECTION
   ========================================================================== */
.profiles-section {
    padding: var(--spacing-lg) 0 var(--spacing-lg) 0;
    background: var(--color-bg-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    padding-left: 60px;
    padding-right: 60px;
}

.section-title {
    color: var(--color-text-primary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    line-height: 24px;
}

.section-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.section-subtitle {
    color: #9D9C9C;
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 20px;
    margin-top: 8px;
    margin-bottom: 0;
    text-align: left;
    padding-left: 0;
}

.view-all-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1.14px solid var(--color-border-primary);
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--color-surface-secondary);
    font-size: var(--font-size-xs);
    font-family: var(--font-family);
    font-weight: 200;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 13.40px;
}

.view-all-btn:hover {
    background: var(--color-surface-secondary);
    color: var(--color-bg-primary);
}

/* ==========================================================================
   PROFILE GRIDS
   ========================================================================== */
.profiles-grid-trending,
.profiles-grid-scientists-on-ari {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: var(--spacing-lg);
    padding-left: 60px;
    padding-right: 60px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
}

/* Hide scrollbar in Webkit browsers (Chrome, Safari) */
.profiles-grid-trending::-webkit-scrollbar,
.profiles-grid-scientists-on-ari::-webkit-scrollbar {
    display: none;
}

.profile-card {
    width: 604px;
    min-width: 604px;
    max-width: 604px;
    padding: var(--spacing-xl);
    background: #18181b;
    cursor: pointer;
    border-radius: var(--radius-lg);
    display: flex;
    gap: var(--spacing-2xl);
    transition: all 0.2s ease;
    margin: 4px 0;
    overflow: visible;
}

.profile-image {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.profile-photo {
    width: 234px;
    height: 232px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
}

/* Style for Autopoiesis logo placeholder */
.profile-image.logo-placeholder {
    background-color: #000000;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 234px;
    height: 232px;
    min-height: 232px;
}

.profile-image .logo-placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-image.logo-placeholder .logo-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.profile-image.logo-placeholder .logo-text {
    color: #FFFFFF;
    font-family: 'Helvetica Now Display', sans-serif;
    font-size: 18px;
    font-weight: 400;
    white-space: nowrap;
}

/* Trending card logo placeholder */
.logo-placeholder-trending {
    background-color: #000000;
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 240px;
    min-height: 240px;
}

.logo-placeholder-trending .logo-placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logo-placeholder-trending .logo-icon {
    width: 25px; /* Match Scientists on ARI size */
    height: 25px; /* Match Scientists on ARI size */
    max-width: 25px;
    max-height: 25px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-placeholder-trending .logo-text {
    color: #FFFFFF;
    font-family: 'Helvetica Now Display', sans-serif;
    font-size: 18px; /* Match Scientists on ARI size */
    font-weight: 400;
    white-space: nowrap;
}

.profile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

/* Desktop: Center profile content vertically */
@media (min-width: 769px) {
    .profile-content {
        justify-content: center;
    }
}

/* Desktop: Make occupation grey like mobile */
.profile-card .profile-title {
    color: #9D9C9C;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

.profile-name {
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2rem;
    margin: 0;
}

/* Truncate name to 2 lines for Scientists on ARI cards */
.profiles-grid-scientists-on-ari .profile-card .profile-name {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Allow research area pill to extend longer in Scientists on ARI section */
.profiles-grid-scientists-on-ari .profile-tag {
    max-width: 295px !important;
}

/* Keep Scientists on ARI cards at fixed width on desktop */
@media (min-width: 769px) {
    .profiles-grid-scientists-on-ari .profile-card {
        width: 604px !important;
        min-width: 604px !important;
        max-width: 604px !important;
    }
}

/* Trending pill styling - only for trending cards */
.profiles-grid-trending .px-2.py-1 {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    padding: 4px 8px !important;
    background: rgba(3, 222, 119, 0.1) !important;
    border: 1px solid #03DE77 !important;
    border-radius: 20px !important;
    color: #03DE77 !important;
    z-index: 10 !important;
    outline: 1px solid #03DE77 !important;
    outline-offset: -1px !important;
}

.profiles-grid-trending .px-2.py-1 img {
    width: 14px !important;
    height: 14px !important;
}

.profiles-grid-trending .px-2.py-1 div {
    color: #03DE77 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

.profile-title {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 30px;
}

/* Bullet separator styling */
.profile-title .bullet-separator {
    color: var(--color-text-subtitle);
    margin: 0 5px;
}

/* Institution text styling */
.profile-title .institution-text {
    color: var(--color-text-subtitle);
    font-weight: 400;
}

/* Trending card bullet separator and institution text styling */
.profiles-grid-trending .bullet-separator {
    color: var(--color-text-subtitle);
    margin: 0 5px;
}

.profiles-grid-trending .institution-text {
    color: var(--color-text-subtitle);
    font-weight: 400;
}

/* Make profile tags look like pills with content-based width */
.profile-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 9px var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 4px);
    border: 1.14px solid var(--color-border-secondary);
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 400;
    line-height: 1.15;
    white-space: nowrap;
    width: fit-content;
    max-width: 150px;
    overflow: visible;
    text-overflow: ellipsis;
    position: relative;
}

/* Ensure the span inside the pill truncates properly */
.profile-tag span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: inherit;
    display: inline-block;
}

/* Remove truncation for institution pills but keep on single line */
.profile-tag[data-full-text*="institution"] span,
.profile-tag:has(.institution-icon) span {
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
    max-width: 200px;
}

/* Allow institution pill to expand to fit content */
.profile-tag[data-full-text*="institution"],
.profile-tag:has(.institution-icon) {
    max-width: 250px;
    flex-shrink: 0;
}

/* Make profile tags container flexible */
.profile-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.profile-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Ensure tag icons are properly sized and positioned */
.profile-tag .tag-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-left: -4px;
}

.institution-icon {
    background: url('assets/icons/institution.svg') no-repeat center;
    background-size: contain;
}

.microscope-icon {
    background: url('assets/icons/microscope.svg') no-repeat center;
    background-size: contain;
}

.profile-btn {
    align-self: stretch;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-text-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: var(--color-bg-primary);
    font-size: var(--font-size-xs);
    font-family: var(--font-family);
    font-weight: 500;
    line-height: 13.40px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.profile-btn:hover {
    background-color: #d0d0d0;
}

/* Pill hover tooltip */
.pill-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #424242;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0px 0px 8px rgba(40, 40, 40, 0.16);
    display: none;
    z-index: 1000;
    margin-bottom: 8px;
    white-space: nowrap;
    color: var(--color-text-primary);
    font-size: var(--font-size-xs);
    font-weight: 400;
}

/* Ensure trending cards maintain fixed width */
.profiles-grid-trending>div {
    width: 604px;
    min-width: 604px;
    max-width: 604px;
    flex-shrink: 0;
}

/* Tailwind-like utility classes for trending cards */
.p-6 {
    padding: 1.5rem;
    cursor: pointer;
}

.bg-zinc-900 {
    background-color: #18181b;
}

.rounded-\[20px\] {
    border-radius: 20px;
}

.outline {
    outline: none;
}

.outline-offset-\[-1px\] {
    outline-offset: -1px;
}

.inline-flex {
    display: inline-flex;
}

.flex-col {
    flex-direction: column;
}

.justify-start {
    justify-content: flex-start;
}

.items-start {
    align-items: flex-start;
}

.gap-2\.5 {
    gap: 0.625rem;
}

.overflow-hidden {
    overflow: hidden;
}

.w-\[656px\] {
    width: 656px !important;
    min-width: 656px !important;
    flex-shrink: 0 !important;
}

.justify-end {
    justify-content: flex-end;
}

.gap-8 {
    gap: 2rem;
}

.w-60 {
    width: 242px;
}

.self-stretch {
    align-self: stretch;
}

.rounded-2xl {
    border-radius: 1rem;
}

/* Fix trending card image to zoom in instead of stretching */
.profiles-grid-trending .w-60 {
    object-fit: cover;
    object-position: center;
    height: 332px;
}

/* Align trending card button to bottom of image */
.profiles-grid-trending .flex-1 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 332px;
}

.profiles-grid-trending .trending-profile-btn {
    align-self: stretch;
    margin-top: auto;
    width: 100%;
}

/* Make trending reason container fit content height only */
.profiles-grid-trending .bg-Color-Surface-background-card-bg--default {
    align-self: flex-start;
    flex-shrink: 0;
    height: auto;
    flex-grow: 0;
}

/* Override self-stretch for trending reason container */
.profiles-grid-trending .self-stretch.bg-Color-Surface-background-card-bg--default {
    align-self: flex-start !important;
    height: auto !important;
}

/* Scientists on ARI cards - align content to top */
.profiles-grid-scientists-on-ari .flex-1 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: flex-start;
    height: 232px;
}

/* Scientists on ARI image size */
.profiles-grid-scientists-on-ari .w-60 {
    width: 234px !important;
    height: 232px !important;
    align-self: stretch;
    border-radius: 16px;
    object-fit: cover;
    object-position: center;
}

.profiles-grid-scientists-on-ari .profile-btn {
    align-self: stretch;
    margin-top: auto;
    width: 100%;
}

.flex-1 {
    flex: 1 1 0%;
}

.relative {
    position: relative;
}

.gap-5 {
    gap: 20px;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-top: -0.3rem;
}

.font-medium {
    font-weight: 500;
}

.leading-normal {
    line-height: 1.5;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.font-normal {
    font-weight: 400;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 12px;
}

.flex-wrap {
    flex-wrap: wrap;
}

.content-start {
    align-content: flex-start;
}

.px-3\.5 {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
}

.py-2\.5 {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.rounded-\[34\.21px\] {
    border-radius: 34.21px;
}

.outline-offset-\[-1\.14px\] {
    outline-offset: -1.14px;
}

/* White outline for institution pill */
.profiles-grid-trending .px-3\.5 {
    outline: 1px solid white !important;
    outline-offset: -1.14px !important;
}

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

.items-center {
    align-items: center;
}

.w-3\.5 {
    width: 0.875rem;
}

.h-3\.5 {
    height: 0.875rem;
}

.w-3 {
    width: 0.75rem;
}

.h-3 {
    height: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.leading-3 {
    line-height: 0.75rem;
}

.p-3 {
    padding: 12px;
}

.bg-Color-Surface-background-card-bg--default {
    background-color: #2E2E2E;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.outline-offset-\[-1px\] {
    outline-offset: -1px;
}

/* Remove outline from trending explanation section */
.profiles-grid-trending .p-3 {
    outline: none !important;
}

.left-0 {
    left: 0;
}

.top-0 {
    top: 0;
}

.absolute {
    position: absolute;
}

.gap-1 {
    gap: 0.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 0.75rem;
}

.leading-tight {
    line-height: 1.25;
}

/* Trending reason container */
.trending-reason-container {
    position: relative;
    width: 100%;
}

/* Ensure trending reason text wraps properly */
.profiles-grid-trending .trending-reason-text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Trending reason text - 2 lines when name wraps */
.profiles-grid-trending .name-wrapped .trending-reason-text {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Trending reason tooltip */
.trending-reason-tooltip {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 282px;
    background: #2E2E2E;
    border-radius: 10px;
    padding-top: 8px;
    padding-right: 12px;
    padding-bottom: 12px;
    padding-left: 12px;
    box-shadow: 0px 0px 8px rgba(40, 40, 40, 0.16);
    display: none;
    z-index: 1000;
    pointer-events: none;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    font-family: 'Helvetica Now Display', sans-serif;
}

/* Remove any margin/padding from tooltip header to match original exactly */
.trending-reason-tooltip > .self-stretch:first-child {
    margin: 0;
    padding: 0;
}

/* Tooltip header - matches the trending reason section header */
.trending-reason-tooltip .self-stretch {
    width: 100%;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
}

.trending-reason-tooltip .flex {
    display: flex;
}

.trending-reason-tooltip .items-center {
    align-items: center;
}

.trending-reason-tooltip .gap-1 {
    gap: 0.25rem;
}

.trending-reason-tooltip .w-3\.5 {
    width: 14px;
    height: 14px;
}

/* Make link-move icon grey to match link-grey.svg color */
.link-move-icon {
    filter: brightness(0) saturate(100%) invert(62%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
    opacity: 0.6;
}

/* Make link-move icon container clickable */
.link-move-icon-container {
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.link-move-icon-container:hover {
    opacity: 0.8;
}

.link-move-icon-container:hover .link-move-icon {
    opacity: 0.9;
}

.trending-reason-tooltip .text-xs {
    font-size: 0.75rem;
    line-height: 0.75rem;
}

.trending-reason-tooltip .text-Color-Text-default-subtitle {
    color: var(--Color-Text-default-subtitle, #9D9C9C);
}

.trending-reason-tooltip .font-normal {
    font-weight: 400;
}

.trending-reason-tooltip .text-left {
    text-align: left;
}

.trending-reason-tooltip .leading-3 {
    line-height: 0.75rem;
}

/* Tooltip text content - matches trending-reason-text but without truncation */
.trending-reason-tooltip-text {
    width: 100%;
    color: var(--Color-Text-default-primary--text, #FFFFFF);
    font-size: 0.875rem;
    font-weight: 400;
    font-family: 'Helvetica Now Display', sans-serif;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-top: 6px;
}

/* Show tooltip on hover */
.trending-reason-container.has-tooltip:hover .trending-reason-tooltip {
    display: flex;
}

/* Hide tooltip on mobile - no hover support */
@media (max-width: 768px) {
    .trending-reason-tooltip {
        display: none !important;
    }
    
    .trending-reason-container.has-tooltip:hover .trending-reason-tooltip {
        display: none !important;
    }
    
    /* Remove truncation for trending reason text on mobile */
    .profiles-grid-trending .trending-reason-text {
        display: block !important;
        -webkit-line-clamp: none !important;
        line-clamp: none !important;
        -webkit-box-orient: initial !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    .profiles-grid-trending .name-wrapped .trending-reason-text {
        -webkit-line-clamp: none !important;
        line-clamp: none !important;
    }
}

/* Trending card name row - allow wrapping to prevent touching pill */
.profiles-grid-trending .self-stretch.inline-flex.justify-between.items-start {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

/* Name container - allow wrapping and prevent touching pill */
.profiles-grid-trending .self-stretch.inline-flex.justify-between.items-start > div:first-child {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 90px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.25;
}

/* Trending pill - maintain position */
.profiles-grid-trending .px-2.py-1 {
    flex-shrink: 0;
    margin-left: auto;
}

.h-9 {
    height: 2.25rem;
}

/* Fix View Profile button text visibility */
.profiles-grid-trending .h-9 {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    line-height: 1;
}

/* Make trending profile button clickable */
.trending-profile-btn {
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.trending-profile-btn:hover {
    background-color: #e5e5e5;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.bg-Color-Surface-default-action {
    background-color: #ffffff;
}

.text-center {
    text-align: center;
}

.text-Color-Text-default-action-\(button\) {
    color: #000000;
}

.text-Color-Text-default-subtitle {
    color: #9D9C9C;
}

.bg-green-700\/10 {
    background-color: rgba(21, 128, 61, 0.1);
}

.outline-emerald-600 {
    outline-color: #059669;
}

.bg-emerald-500 {
    background-color: #10b981;
}

.text-emerald-500 {
    color: #10b981;
}

.leading-none {
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .profiles-section {
        padding: var(--spacing-lg) 40px;
    }

    .profile-card {
        min-width: 500px;
    }
}

@media (max-width: 768px) {
    /* Mobile-specific animations - fade only, no translation */
    .profiles-section,
    .section-header,
    .profiles-grid-trending,
    .profiles-grid-scientists-on-ari,
    .profile-card {
        transform: none !important;
    }

    .profile-btn {
        font-size: 13px !important;
        margin-top: 16px !important;
    }

    .trending-profile-btn {
        font-size: 13px !important;
        margin-top: 16px !important;
    }

    /* Hide subtitle text on mobile for trending profiles and scientists sections */
    .section-subtitle {
        display: none !important;
    }

    /* Mobile layout for profiles sections */
    .profiles-section {
        padding: var(--spacing-lg) 20px !important;
    }
    
    /* Add extra space above trending profiles section on mobile */
    .profiles-section:first-of-type,
    .profiles-section:has(.profiles-grid-trending) {
        margin-top: 100px !important;
        padding-top: calc(var(--spacing-lg) + 40px) !important;
    }

    .section-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: var(--spacing-lg) !important;
        padding: 0 !important;
    }

    .section-title {
        margin: 0 !important;
        text-align: left !important;
        font-size: 20px !important;
    }

    .view-all-btn {
        margin: 0 !important;
    }

    /* Mobile profile cards - image at top instead of left */
    .profiles-grid-trending,
    .profiles-grid-scientists-on-ari {
        flex-direction: column !important;
        gap: var(--spacing-lg) !important;
        overflow-x: visible !important;
        padding: 0 !important;
    }

    .profile-card {
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        background: #18181b !important;
        outline: none !important;
        outline-offset: 0 !important;
        padding: 20px !important;
        gap: 10px !important;
    }

    /* Mobile trending cards - image at top and full width */
    .profiles-grid-trending .p-6 {
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        padding: 20px !important;
        background: #18181b !important;
        border-radius: 20px !important;
        outline: none !important;
        outline-offset: 0 !important;
        overflow: hidden !important;
    }

    .profiles-grid-trending .w-\[556px\] {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    /* Profile image at top - full width for trending cards */
    .profiles-grid-trending .w-60 {
        width: 100% !important;
        height: 208px !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 16px !important;
        margin: 0 !important;
        order: -1 !important;
    }

    /* Trending card logo placeholder - match exact dimensions on mobile */
    .profiles-grid-trending .logo-placeholder-trending {
        width: 100% !important;
        height: 208px !important;
        min-height: 208px !important;
        max-height: 208px !important;
        margin: 0 !important;
        border-radius: 16px !important;
        order: -1 !important;
    }

    /* Content below image for trending cards */
    .profiles-grid-trending .flex-1 {
        width: 100% !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        height: auto !important;
    }

    /* Why they're trending section - full width on mobile */
    .profiles-grid-trending .self-stretch {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .profiles-grid-trending .p-3 {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    /* Trending cards - smaller fonts for mobile */
    .profiles-grid-trending .text-2xl {
        font-size: 20px !important;
        line-height: 1.6 !important;
    }

    .profiles-grid-trending .text-base {
        font-size: 16px !important;
        line-height: 1 !important;
    }

    /* Profile content below image */
    .profile-card .flex-1 {
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        position: relative !important;
    }

    /* Space between occupation and institution pill for Scientists on ARI cards */
    .profile-card .profile-content {
        gap: 20px !important;
    }

    /* Scientists on ARI cards - same spacing as trending cards */
    .profiles-grid-scientists-on-ari .profile-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    .profiles-grid-scientists-on-ari .profile-card .profile-content {
        gap: 16px !important;
    }

    /* Name section */
    .profile-card .flex-1>div:first-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Name row */
    .profile-card .flex-1>div:first-child>div:first-child {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    /* Name text - smaller for mobile */
    .profile-card .profile-name {
        font-size: 20px !important;
        font-weight: 500 !important;
        line-height: 1.6 !important;
        color: #ffffff !important;
        margin: 0 !important;
    }

    /* Role text - smaller for mobile */
    .profile-card .profile-title {
        font-size: 16px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        color: #9D9C9C !important;
        margin: 0 !important;
    }

    /* Institution/field pills - flex wrap */
    .profile-card .flex-1>div:nth-child(2) {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    /* View Profile button - full width */
    .profile-card .h-9 {
        width: 100% !important;
        height: 36px !important;
        border-radius: 34.21px !important;
        background: #ffffff !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 12px !important;
        color: #000000 !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        text-align: center !important;
    }

    /* Trending badge - positioned absolutely (only for trending profiles) */
    .profiles-grid-trending .profile-card .px-2 {
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        background: rgba(16, 185, 129, 0.1) !important;
        border: 1px solid #10b981 !important;
        border-radius: 20px !important;
        padding: 4px 8px !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        color: #10b981 !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
    }

    /* Hide trending badge for scientists on ARI profiles */
    .profiles-grid-scientists-on-ari .profile-card .px-2 {
        display: none !important;
    }

    /* Mobile trending badge - more padding */
    .profiles-grid-trending .px-2.py-1 {
        padding: 5px 8px !important;
    }

    /* Add extra spacing after trending profiles */
    .profiles-grid-trending {
        margin-bottom: 40px;
    }

    /* Profile sections - these are shared between homepage and search page */
    .profiles-section {
        padding: var(--spacing-lg) 20px;
    }

    .profiles-grid-trending {
        flex-direction: column;
        gap: var(--spacing-lg);
        overflow-x: visible;
    }

    .profiles-grid-scientists-on-ari {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .profile-card {
        min-width: auto;
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .profile-photo {
        width: 100%;
        height: 200px;
    }

    /* Make logo placeholder match exact dimensions of profile images on mobile */
    .profile-image.logo-placeholder {
        width: 100% !important;
        height: 200px !important;
        margin: 0 !important;
        border-radius: 16px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }
}
