/* Results Page Styles */

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

/* Results page header elements - no animation, always visible */
.results-search-section,
.popular-searches,
.hero-content div[onclick="goBackToSearch()"] {
    opacity: 1;
    transform: none;
}

/* Section elements - hidden until scroll */
.results-header,
.results-grid {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When sort dropdown is open, remove transform to prevent stacking context */
.results-header:has(.sort-menu.show),
.results-header.dropdown-open {
    transform: none;
}

/* Profile cards - fade in with slight stagger */
.profile-card {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ==========================================================================
   RESULTS LOADING SPINNER
   ========================================================================== */

.results-loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none; /* default hidden */
    align-items: center;
    justify-content: center;
    z-index: 999; /* Below header (z-index: 1000) so header stays visible */
    pointer-events: none;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 200ms ease-in-out;
}

.results-loading-spinner-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-loading-spinner-logo {
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    filter: brightness(0) invert(1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Main container */
.results-main {
    min-height: 100vh;
    background: var(--Color-Surface-background-page-bg, black);
    color: var(--Color-Text-default-primary--text, white);
    margin-top: 98px;
}

.results-container {
    max-width: full;
    margin: 0;
    padding: 0 256px 0 256px;
}

/* Hero Section */
.results-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 17px; /* Reduced from 95px to move everything up */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 60px;
    align-self: flex-start;
    width: 100%;
}

/* Desktop: Move back button higher */
.hero-content div[onclick="goBackToSearch()"] {
    top: 0px !important; /* Reduced from 78px to move higher */
}


/* ==========================================================================
   SEARCH SECTION
   ========================================================================== */

.results-search-section {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px; /* Reduced top margin from 60px to move up with back button */
}

.results-search-section .search-container {
    max-width: none;
    border-radius: 44px;
}

/* ==========================================================================
   RESULTS HEADER
   ========================================================================== */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.mobile-results-header {
    display: none;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 28px;
}

.results-title {
    font-size: 16px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    color: white;
}

.results-title em {
    font-style: italic;
}

.results-count {
    font-size: 16px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    color: var(--Color-Text-default-subtitle, #9D9C9C);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.sort-dropdown,
.view-all-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 34.21px;
    border: 1.14px solid var(--Color-Border-default-primary, #868686);
    cursor: pointer;
    color: var(--Color-Text-default-primary--text, white);
    font-size: 16px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 400;
    line-height: 16px;
    transition: all 0.2s ease;
    background: transparent;
}

.sort-dropdown:hover,
.view-all-button:hover {
    background: rgba(255, 255, 255, 0.05);
    outline-color: var(--Color-Text-default-primary--text, white);
}

/* Hide suggested searches when there are results */
.results-search-section .popular-searches.hide-suggestions {
    display: none !important;
}

.sort-icon {
    width: 16px;
    height: 16px;
    transform: translateY(1px);
}

/* Sort Menu */
.sort-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 16px 20px;
    background: var(--Color-Surface-background-page-bg, #2F2F2F);
    border-radius: 16px;
    border: 1.14px solid var(--Color-Border-default-primary, #868686);
    display: none;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
    width: fit-content;
    box-sizing: border-box;
}

.sort-menu.show {
    display: flex;
}

.sort-option {
    color: var(--Color-Text-default-secondary--text, #FFFFFF);
    font-size: 14px;
    font-weight: 400;
    font-family: 'Helvetica Now Display', sans-serif;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.sort-option:hover {
    opacity: 0.8;
}

/* ==========================================================================
   RESULTS GRID
   ========================================================================== */

.results-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
    justify-content: center;
    max-width: 100%;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ==========================================================================
   PROFILE CARDS
   ========================================================================== */

.profile-card {
    width: 100%;
    min-width: 0; /* Allow flex shrinking */
    max-width: 100%; /* Prevent overflow */
    padding: 20px;
    background: #18181b;
    border-radius: 20px;
    overflow: visible;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}


/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Small tablets */
@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        padding: 0 60px;
        margin-bottom: 80px; /* Minimum space between last cards and footer */
    }
}


/* Large desktops */
@media (min-width: 1400px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        padding: 0 256px;
    }
}

/* Extra large monitors */
@media (min-width: 2000px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        padding: 0 256px;
    }
}

.profile-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 100%; /* Take full height of card */
}

.profile-card .profile-image {
    width: 100%;
    height: 245.95px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-card .profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style for Autopoiesis logo placeholder */
.profile-card .profile-image.logo-placeholder {
    background-color: #000000;
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 245.95px;
}

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

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

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

.profile-card .profile-info {
    display: flex;
    flex-direction: column;
    gap: 0; /* Remove fixed gap */
    flex: 1; /* Take remaining space */
}

.profile-card .profile-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1; /* Allow header to grow and push tags down */
    margin-bottom: 24px; /* Minimum spacing to profile-tags - desktop only */
}

.profile-card .profile-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    /* Reserve space for trending pill */
    padding-right: 100px;
}

/* Trending pill styling for results cards */
.profile-card .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 #10b981 !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.profile-card .px-2.py-1 img {
    width: 14px !important;
    height: 14px !important;
}

.profile-card .px-2.py-1 div {
    color: #10b981 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

/* Limit recent highlights to 2 lines with truncation (same as trending cards) */
.profile-card .highlight-text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--Color-Text-default-primary--text, white);
    font-size: 16px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 500;
    margin: 0;
}

.profile-card .profile-name {
    color: var(--Color-Text-default-primary--text, white);
    font-size: 20px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 500;
    line-height: 1.1;
    margin: 0;
    /* Truncate name to prevent overlap with trending pill */
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* Allow flex shrinking */
}

.profile-card .profile-status {
    width: 20px;
    height: 20px;
    overflow: hidden;
}

.profile-card .status-dots {
    width: 13px;
    height: 13px;
    background: url('assets/icons/dots.svg') no-repeat center;
    background-size: contain;
}

.profile-card .profile-title {
    color: #9D9C9C !important; /* Force grey color */
    font-size: 16px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 400;
    line-height: 20px; /* Increased line spacing for wrapping */
    margin: 0;
}

/* Bullet separator styling */
.profile-card .profile-title .bullet-separator {
    color: #9D9C9C !important; /* Same grey as main text */
    margin: 0 5px;
}

/* Institution text styling */
.profile-card .profile-title .institution-text {
    color: #9D9C9C !important; /* Same grey as main text */
    font-weight: 400;
}

.profile-card .profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    margin-bottom: 24px; /* Consistent spacing to profile-btn */
}

.profile-card .profile-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 15px;
    border-radius: 34.21px;
    border: 1.14px solid var(--Color-Border-default-secondary, #DBD9D9);
    color: var(--Color-Text-default-primary--text, white);
    font-size: 14px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 400;
    line-height: 13.40px;
    width: fit-content;
}

.profile-card .profile-tag.view-all {
    background: var(--Color-Text-default-disabled, #424242);
    color: var(--Color-Text-default-secondary--text, #DBD9D9);
    border: none;
}

.profile-card .tag-icon {
    width: 15px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}


.profile-card .tag-icon.institution-icon {
    background-image: url('assets/icons/institution.svg');
}

.profile-card .tag-icon.microscope-icon {
    background-image: url('assets/icons/microscope.svg');
}

.profile-card .tag-icon.arrow-right {
    background-image: url('assets/icons/arrow-right.svg');

}

.profile-card .profile-highlight {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-card .highlight-label {
    color: var(--Color-Text-default-secondary--text, #DBD9D9);
    font-size: 16px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 400;
    line-height: 15.31px;
    margin: 0;
}


.profile-card .profile-btn {
    width: 100%;
    height: 35px;
    padding: 10px 15px;
    background: var(--Color-Surface-default-action, white);
    border: none;
    border-radius: 34.21px;
    color: var(--Color-Text-default-action-button, black);
    font-size: 14px;
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 500;
    line-height: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto; /* Push button to bottom */
}

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


/* Additional fields tooltip for results page */
.profile-card .additional-fields-tooltip {
    position: absolute;
    background: #424242;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0px 0px 8px rgba(40, 40, 40, 0.16);
    display: none;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    min-width: 200px;
    max-width: 400px;
}

/* Ensure the floating tooltip matches search page styling exactly */
#floating-tooltip {
    position: fixed !important;
    background: #424242 !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: 0px 0px 8px rgba(40, 40, 40, 0.16) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    z-index: 9999 !important;
    min-width: 200px !important;
    max-width: 400px !important;
}

.profile-card .tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-card .tooltip-title {
    color: #DBD9D9;
    font-size: 12px;
    font-family: 'Helvetica Now Display';
    font-weight: 400;
    line-height: 11.48px;
    margin-bottom: 8px;
}

.profile-card .additional-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: center;
    width: 267px;
}

.profile-card .additional-tag {
    padding: 10px 15px;
    border-radius: 34.21px;
    border: 1.14px solid #DBD9D9;
    background: transparent;
    color: white;
    font-size: 14px;
    font-family: 'Helvetica Now Display';
    font-weight: 400;
    line-height: 13.40px;
    white-space: nowrap;
}

/* Ensure floating tooltip pills match search page exactly */
#floating-tooltip .tooltip-title {
    color: #DBD9D9 !important;
    font-size: 14px !important;
    font-family: 'Helvetica Now Display' !important;
    font-weight: 400 !important;
    line-height: 11.48px !important;
    margin-bottom: 12px !important;
}

#floating-tooltip .additional-fields {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-content: center !important;
    width: 267px !important;
}

#floating-tooltip .additional-tag {
    padding: 10px 15px !important;
    border-radius: 34.21px !important;
    border: 1.14px solid #DBD9D9 !important;
    background: transparent !important;
    color: white !important;
    font-size: 14px !important;
    font-family: 'Helvetica Now Display' !important;
    font-weight: 400 !important;
    line-height: 13.40px !important;
    white-space: nowrap !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .results-container {
        padding: 0px 128px 0px 128px;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 128px;
    }
}

/* Medium desktops (1201px - 1399px) */
@media (min-width: 1201px) and (max-width: 1399px) {
    .results-container {
        padding: 0px 128px 0px 128px;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        padding: 0 128px;
    }
}

@media (max-width: 768px) {
    /* Mobile-specific animations - fade only, no translation */
    .results-search-section,
    .popular-searches,
    .hero-content div[onclick="goBackToSearch()"],
    .results-header,
    .results-grid,
    .profile-card {
        transform: none !important;
    }
    
    .results-main {
        margin-top: 38px;
        margin-bottom: 60px;
    }
    
    /* Reduce space above back button on mobile and ensure proper order */
    .hero-content div[onclick="goBackToSearch()"] {
        top: 0 !important; /* Remove offset to appear naturally above search bar */
        position: relative !important;
        margin-top: 20px !important; /* Add space above back button */
        margin-bottom: 8px !important; /* Increased space below back button */
    }
    
    .results-hero {
        margin-bottom: 0 !important; /* Remove hero margin on mobile */
    }
    
    .results-search-section {
        margin-top: 0 !important; /* Remove top margin to keep close to back button */
    }
    
    .results-container {
        padding: 24px 20px 32px 20px;
    }
    
    /* Mobile-only: Hide desktop header elements */
    .results-header {
        display: block !important;
        margin-bottom: 0;
        margin-top: 10px !important;
    }
    
    /* Hide desktop results info, sort dropdown, and view all button on mobile */
    .results-info {
        display: none !important;
    }
    
    .sort-dropdown {
        display: none !important;
    }
    
    .view-all-button {
        display: none !important;
    }
    
    /* Ensure desktop sort dropdown is completely hidden on mobile */
    .results-header .sort-dropdown {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Additional specificity to hide desktop sort dropdown */
    .results-header > .sort-dropdown {
        display: none !important;
    }
    
    /* Hide any sort dropdown that's not mobile */
    .sort-dropdown:not(.mobile-sort-dropdown) {
        display: none !important;
    }
    
    /* Show mobile header */
    .mobile-results-header {
        display: block !important;
        margin-bottom: 0px;
    }
    
    /* Mobile results title */
    .mobile-results-title {
        font-size: 20px;
        font-family: 'Helvetica Now Display', sans-serif;
        font-weight: 500;
        line-height: 24px;
        color: white;
        margin: 0 0 10px 0;
    }
    
    .mobile-results-title em {
        font-style: italic;
    }
    
    /* Mobile results row - horizontal layout */
    .mobile-results-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* Mobile results count */
    .mobile-results-count {
        font-size: 16px;
        font-family: 'Helvetica Now Display', sans-serif;
        font-weight: 500;
        line-height: 19.20px;
        color: var(--Color-Text-default-subtitle, #9D9C9C);
        margin: 0;
    }
    
    /* Mobile sort dropdown - exact same specs as desktop */
    .mobile-sort-dropdown {
        position: relative;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        border-radius: 34.21px;
        border: 1.14px solid var(--Color-Border-default-primary, #868686);
        cursor: pointer;
        color: var(--Color-Text-default-primary--text, white);
        font-size: 11px;
        font-family: 'Helvetica Now Display', sans-serif;
        font-weight: 400;
        line-height: 16px;
        transition: all 0.2s ease;
        /* Ensure exact same size as desktop */
        min-width: auto;
        width: auto;
        height: auto;
        box-sizing: border-box;
    }
    
    .mobile-sort-dropdown:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.4);
        color: rgba(255, 255, 255, 0.9);
    }
    
    /* Mobile sort menu - aligned to right of button */
    .mobile-sort-dropdown .sort-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        transform: none;
        margin-top: 8px;
        padding: 16px 20px 16px 20px;
        background: var(--Color-Surface-background-page-bg, #2F2F2F);
        border-radius: 16px;
        border: 1.14px solid var(--Color-Border-default-primary, #868686);
        display: none;
        flex-direction: column;
        gap: 20px;
        z-index: 1000;
        width: fit-content;
        min-width: 150px;
        box-sizing: border-box;
    }
    
    .mobile-sort-dropdown .sort-menu.show {
        display: flex;
    }
    
    .mobile-sort-dropdown .sort-option {
        color: var(--Color-Text-default-secondary--text, #FFFFFF);
        font-size: 14px;
        font-weight: 400;
        font-family: 'Helvetica Now Display', sans-serif;
        line-height: 1;
        cursor: pointer;
        transition: opacity 0.2s ease;
    }
    
    .mobile-sort-dropdown .sort-option:hover {
        opacity: 0.8;
    }
    
    /* Mobile sort icon - same size as desktop */
    .mobile-sort-dropdown .sort-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Mobile view all button - same specs as mobile sort button */
    .mobile-view-all-button {
        position: relative;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        border-radius: 34.21px;
        border: 1.14px solid var(--Color-Border-default-primary, #868686);
        cursor: pointer;
        color: var(--Color-Text-default-primary--text, white);
        font-size: 11px;
        font-family: 'Helvetica Now Display', sans-serif;
        font-weight: 400;
        line-height: 16px;
        transition: all 0.2s ease;
        background: transparent;
        min-width: auto;
        width: auto;
        height: auto;
        box-sizing: border-box;
    }
    
    .mobile-view-all-button:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.4);
        color: rgba(255, 255, 255, 0.9);
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    /* Mobile results card image - exact dimensions */
    .profile-card .profile-image {
        height: 204px !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 16px !important;
        margin: 0 !important;
    }

    /* Make logo placeholder match exact dimensions of profile images on mobile */
    .profile-card .profile-image.logo-placeholder {
        width: 100% !important;
        height: 204px !important;
        margin: 0 !important;
        border-radius: 16px !important;
        min-height: 204px !important;
        max-height: 204px !important;
    }
    
    /* Mobile results card occupation text - same color as search page */
    .profile-card .profile-title {
        color: #9D9C9C !important; /* Same as search page subtitle color */
        font-size: 16px !important; /* Reduced font size for mobile */
    }
    
    /* Mobile results card name - reduced font size and allow wrapping */
    .profile-card .profile-name {
        font-size: 20px !important; /* Reduced font size for mobile */
        white-space: normal !important; /* Allow wrapping on mobile */
        overflow: visible !important; /* Show full text */
        text-overflow: unset !important; /* Remove ellipsis */
        line-height: 1.3 !important; /* Better line spacing for wrapped text */
    }
    
    /* Mobile profile name row - adjust for wrapping */
    .profile-card .profile-name-row {
        padding-right: 100px !important; /* Still reserve space for trending pill */
        align-items: flex-start !important; /* Align to top for wrapped names */
    }
    
    /* Mobile results card profile info - 20px gap */
    .profile-card .profile-info {
        gap: 16px !important;
    }
    
    /* Mobile results card profile header - increased gap */
    .profile-card .profile-header {
        gap: 14px !important;
        margin-bottom: 0 !important; /* Remove desktop minimum spacing for mobile */
    }
    
    /* Mobile results card profile tags - reduced vertical padding */
    .profile-card .profile-tags {
        margin-bottom: 0 !important; /* Remove desktop bottom margin for mobile */
    }
    
    .profile-card .profile-tags .profile-tag {
        padding: 8px 12px !important; /* Reduced vertical padding from default */
    }
    
    /* Mobile results card profile highlight - reduced gap */
    .profile-card .profile-highlight {
        gap: 6px !important; /* Reduced gap for mobile */
    }
    
    /* Mobile results header text - smaller font sizes */
    .results-title,
    .results-count {
        font-size: 20px !important; /* Smaller than default 24px */
    }
    
    /* Mobile results card button - smaller font size like search page */
    .profile-card .profile-btn {
        font-size: 13px !important; /* Same small font as search page mobile */
        margin-top: 16px !important; /* Add top margin for mobile */
    }
    
    /* Mobile results search section - reduced bottom margin */
    .results-search-section {
        margin-bottom: 14px !important; /* Further reduced */
    }
    
    /* Mobile-only: Align suggested searches to the left */
    .results-search-section .popular-searches {
        justify-content: flex-start !important;
        align-items: flex-start !important;
        margin-top: 20px !important;
        margin-bottom: 14px !important;
    }
    
    .results-search-section .search-tags {
        justify-content: flex-start !important;
    }
    
    /* Mobile results search container - remove horizontal margins */
    .results-search-section .search-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Mobile sort icon positioning - reset transform */
    .sort-icon {
        transform: none;
    }
    
    /* Mobile: Increase results title font size */
    .results-title {
        font-size: 24px;
    }
}


/* Also ensure body and html have no margins */
body, html {
    margin: 0;
    padding: 0;
}

/* Popular Searches Styling for Results Page */
.results-search-section {
    display: flex;
    flex-direction: column;
}

.results-search-section .popular-searches {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 32px;
    width: 100%;
    flex-wrap: wrap;
}

.results-search-section .search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Mobile search tag padding */
.search-tag {
    padding: 12px 15px !important;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 60px auto 80px;
    padding: 0 20px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    margin: 0 auto;
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: none;
    color: #9D9C9C;
    font-family: 'Helvetica Now Display', sans-serif;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-page:hover {
    opacity: 0.7;
}

.pagination-page.active {
    color: white;
    font-weight: 700;
    opacity: 1;
}

.pagination-ellipsis {
    color: #9D9C9C;
    font-family: 'Helvetica Now Display', sans-serif;
    font-size: 14px;
    padding: 0 4px;
    user-select: none;
}

/* Mobile pagination */
@media (max-width: 768px) {
    .pagination-container {
        margin: 40px 0 60px;
        gap: 8px;
    }
    
    .pagination-page {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 14px;
    }
    
    .pagination-numbers {
        gap: 4px;
    }
    
    .pagination-ellipsis {
        font-size: 14px;
    }
}

