/* =================================
   SEARCH INTERFACE
   ================================= */

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
}

.search-orb {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 15px 30px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-orb:focus-within {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.5);
    box-shadow: 
        0 12px 40px rgba(0, 122, 255, 0.2),
        0 0 0 1px rgba(0, 122, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 18px;
    font-weight: 300;
    padding: 0;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* =================================
   POPULAR SEARCHES GRID
   ================================= */

.popular-searches {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 30px 0 30px;
}

.popular-searches h2 {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 28px;
    font-weight: 200;
    margin-top: 0;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* =================================
   SEARCH CARDS
   ================================= */

.search-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.05), 
        transparent);
    transition: left 0.6s ease;
}

.search-card:hover::before {
    left: 100%;
}

.search-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Manufacturer cards with logos */
.search-card.manufacturer {
    border-color: rgba(255, 215, 0, 0.2);
}

.search-card.manufacturer:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2);
}

/* Specialty cards */
.search-card.specialty {
    border-color: rgba(0, 122, 255, 0.2);
}

.search-card.specialty:hover {
    border-color: rgba(0, 122, 255, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 122, 255, 0.2);
}

/* Geographic cards */
.search-card.geographic {
    border-color: rgba(52, 199, 89, 0.2);
}

.search-card.geographic:hover {
    border-color: rgba(52, 199, 89, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(52, 199, 89, 0.2);
}

/* =================================
   CARD CONTENT
   ================================= */

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.search-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.15);
}

.card-icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
}

.card-icon.emoji {
    font-size: 32px;
    line-height: 1;
}

.card-title {
    color: white;
    font-size: 19px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0.3px;
}

.card-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.5px;
}

/* =================================
   MEMBER RESULTS
   ================================= */

.member-results {
    display: none;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 30px;
}

.member-results.active {
    display: block;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.member-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .search-card {
        padding: 25px 20px;
    }
    
    .card-title {
        font-size: 17px;
    }
    
    .search-orb {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .search-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .popular-searches {
        padding: 0 20px;
    }
    
    .search-container {
        padding: 0 15px;
    }
}

/* =================================
   SUPER BIG LOGOS - REPLACE PREVIOUS VERSION
   ================================= */

/* Make manufacturer cards much larger */
.search-card.manufacturer {
    min-height: 220px !important;
    padding: 35px 25px !important;
}

/* Much bigger icon containers */
.search-card.manufacturer .card-icon {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto 20px !important;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
}

/* HUGE logos */
.search-card.manufacturer .card-icon img {
    max-width: 100px !important;
    max-height: 100px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.3);
    transition: all 0.4s ease;
}

/* Dramatic logo hover effects */
.search-card.manufacturer:hover .card-icon {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
}

.search-card.manufacturer:hover .card-icon img {
    transform: scale(1.08);
    filter: brightness(1.4) contrast(1.4) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}

/* Enhanced manufacturer card styling */
.search-card.manufacturer .card-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 10px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.search-card.manufacturer .card-count {
    font-size: 15px !important;
    font-weight: 500;
    opacity: 0.9;
}

/* Premium manufacturer card appearance */
.search-card.manufacturer {
    border: 2px solid rgba(255, 215, 0, 0.2) !important;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.06), 
        rgba(255, 215, 0, 0.04),
        rgba(255, 255, 255, 0.02)) !important;
    backdrop-filter: blur(20px) !important;
}

.search-card.manufacturer:hover {
    transform: translateY(-8px) scale(1.03) !important;
    border-color: rgba(255, 215, 0, 0.5) !important;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 215, 0, 0.08),
        rgba(255, 255, 255, 0.04)) !important;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Enhanced non-manufacturer card hover effects to match manufacturer cards */
.search-card:not(.manufacturer):hover .card-icon {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}



.search-card:not(.manufacturer) .card-icon {
    width: 120px;  /* Increased from 65px to match logos */
    height: 120px;  /* Increased from 65px to match logos */
    margin: 0 auto 20px;  /* Match manufacturer margin */
    border-radius: 20px;  /* Match manufacturer border-radius */
    background: rgba(255, 255, 255, 0.1);  /* Match manufacturer background */
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-card:not(.manufacturer) .card-icon.emoji {
    font-size: 60px;  /* Increased from 30px to be proportional */
}



/* Grid adjustments to accommodate larger cards */
.search-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 30px !important;
}


/* Mobile responsiveness */
@media (max-width: 768px) {
    .search-card.manufacturer {
        min-height: 200px !important;
        padding: 30px 20px !important;
    }
    
    .search-card.manufacturer .card-icon {
        width: 100px !important;
        height: 100px !important;
    }
    
    .search-card.manufacturer .card-icon img {
        max-width: 85px !important;
        max-height: 85px !important;
    }
    
    /* Non-manufacturer cards on mobile */
    .search-card:not(.manufacturer) {
        min-height: 200px !important;
        padding: 30px 20px !important;
    }
    
    .search-card:not(.manufacturer) .card-icon {
        width: 100px !important;
        height: 100px !important;
    }
    
    .search-card:not(.manufacturer) .card-icon.emoji {
        font-size: 65px !important;
    }
    
    .search-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 25px !important;
    }
}

@media (max-width: 480px) {
    .search-card.manufacturer .card-icon {
        width: 90px !important;
        height: 90px !important;
    }
    
    .search-card.manufacturer .card-icon img {
        max-width: 75px !important;
        max-height: 75px !important;
    }
}



/* Add this CSS to your components.css or create a new match-counter.css file */

/* =================================
   MATCH COUNTER STYLES
   ================================= */

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
}

/* Match counter container */
.match-counter {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 20px;
    opacity: 0;
    transform: translateY(-10px);
}

.match-counter.active {
    opacity: 1;
    transform: translateY(0);
    color: rgba(79, 195, 247, 0.8);
}

.match-counter.loading {
    color: rgba(255, 149, 0, 0.6);
}

/* Count number styling */
.match-counter .count-number {
    font-weight: 700;
    color: #4fc3f7;
    font-size: 15px;
    margin-right: 4px;
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
}

/* Different states */
.match-counter.no-results .count-number {
    color: #ff6b6b;
}

.match-counter.many-results .count-number {
    color: #34c759;
}

.match-counter.few-results .count-number {
    color: #ff9500;
}

/* Press Enter hint in search box */
.search-hint {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', 'Monaco', monospace;
}

.search-orb:focus-within .search-hint {
    opacity: 0;
    transform: translateY(-50%) translateX(10px);
}

.search-input:not(:placeholder-shown) ~ .search-hint {
    background: rgba(79, 195, 247, 0.1);
    color: rgba(79, 195, 247, 0.6);
    animation: gentleGlow 2s ease-in-out infinite;
}

/* Enhanced search orb when showing results */
.search-orb.has-results {
    border-color: rgba(79, 195, 247, 0.4);
    background: rgba(79, 195, 247, 0.03);
}

/* Animations */
@keyframes gentleGlow {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 0 0 5px rgba(79, 195, 247, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(79, 195, 247, 0.4);
    }
}

@keyframes countPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* When updating count */
.match-counter.updating .count-number {
    animation: countPulse 0.3s ease-out;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .match-counter {
        font-size: 12px;
        margin-top: 12px;
    }
    
    .match-counter .count-number {
        font-size: 14px;
    }
    
    .search-hint {
        font-size: 10px;
        padding: 2px 6px;
        right: 15px;
    }
}

/* Color-coded count ranges */
.match-counter[data-count="high"] {
    color: rgba(52, 199, 89, 0.8);
}

.match-counter[data-count="medium"] {
    color: rgba(255, 149, 0, 0.8);
}

.match-counter[data-count="low"] {
    color: rgba(255, 59, 48, 0.8);
}

/* Smooth transition for search input */
.search-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    letter-spacing: 0.3px;
}

/* Additional visual feedback */
.search-orb.counting {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 149, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}


/* =================================
   UNIFIED IMAGE SIZING - LARGER IMAGES IN SAME BOXES
   ================================= */

/* Keep container size the same */
.search-card .card-icon {
    width: 120px !important;
    height: 120px !important;
    padding: 5px !important;  /* Reduced from 15px - gives images more room */
    box-sizing: border-box !important;
}

.search-card .card-icon img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    filter: brightness(1.2) contrast(1.3);
    transition: all 0.4s ease;
}

/* Remove extra padding for geographic/specialty */
.search-card.geographic .card-icon img,
.search-card.specialty .card-icon img {
    padding: 0;  /* No extra padding */
}

/* JPG images need more brightness */
.search-card .card-icon img[src$=".jpg"] {
    filter: brightness(1.5) contrast(1.5) grayscale(0.1);
    opacity: 0.9;
}

/* SVG files */
.search-card .card-icon img[src$=".svg"] {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Hover effects */
.search-card:hover .card-icon img {
    transform: scale(1.1);  /* Slightly bigger scale on hover */
    filter: brightness(1.6) contrast(1.6) drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

/* Mobile sizing - also with minimal padding */
@media (max-width: 768px) {
    .search-card .card-icon {
        width: 100px !important;
        height: 100px !important;
        padding: 4px !important;  /* Minimal padding */
    }
}

@media (max-width: 480px) {
    .search-card .card-icon {
        width: 90px !important;
        height: 90px !important;
        padding: 3px !important;  /* Minimal padding */
    }
}


/* =================================
   ENHANCED MEMBER CARD STYLES
   ================================= */

/* Country and distance badges */
.member-card .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Distance-specific coloring */
.distance-very-close {
    background: rgba(79, 195, 247, 0.15) !important;
    border: 1px solid rgba(79, 195, 247, 0.5) !important;
    color: #4fc3f7 !important;
}

.distance-close {
    background: rgba(79, 195, 247, 0.1) !important;
    border: 1px solid rgba(79, 195, 247, 0.3) !important;
    color: rgba(79, 195, 247, 0.9) !important;
}

.distance-medium {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.distance-far {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Country badge styling */
.country-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Hover effects */
.member-card:hover .badge {
    transform: scale(1.05);
}

/* Improved member card layout */
.member-card h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.member-card p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .member-card h3 {
        font-size: 17px !important;
    }
    
    .badge {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .distance-badge-enhanced {
        margin-top: 5px;
        margin-left: 0 !important;
        width: fit-content;
    }
    
    .country-badge {
        margin-top: 5px;
        margin-left: 0 !important;
    }
}

/* Ensure proper text wrapping */
.member-card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Premium glass effect for badges */
.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Animation for new cards */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-card {
    animation: cardSlideIn 0.5s ease-out forwards;
}
