/* Organic Nature Theme - Search Hub Styles */

:root {
    /* Nature-inspired color palette */
    --moss-dark: #2d4a2b;
    --moss-medium: #4a6741;
    --moss-light: #6b8e4e;
    --sage-green: #87a96b;
    --spring-green: #a8c09a;
    --leaf-accent: #7fb069;
    --bark-brown: #6f4e37;
    --soil-dark: #3e2723;
    --sand-light: #f5e6d3;
    --morning-mist: #e8f5e9;
    --sky-blue: #87ceeb;
    --pollen-yellow: #f7dc6f;
    --berry-red: #d32f2f;
    
    /* Organic spacing rhythm */
    --space-seed: 0.25rem;
    --space-sprout: 0.5rem;
    --space-stem: 1rem;
    --space-branch: 1.5rem;
    --space-canopy: 2.5rem;
    --space-forest: 4rem;
    
    /* Natural transitions */
    --transition-breeze: 200ms ease-out;
    --transition-growth: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-season: 600ms ease-in-out;
    
    /* Organic shapes */
    --radius-pebble: 0.25rem;
    --radius-stone: 0.5rem;
    --radius-boulder: 1rem;
    --radius-hill: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--morning-mist) 0%, var(--sand-light) 100%);
    color: var(--soil-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Organic background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, var(--spring-green) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, var(--sage-green) 0%, transparent 30%),
        radial-gradient(circle at 40% 90%, var(--leaf-accent) 0%, transparent 25%);
    opacity: 0.1;
    pointer-events: none;
    animation: organicFloat 30s ease-in-out infinite;
}

@keyframes organicFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-20px, -30px) scale(1.05); }
    50% { transform: translate(30px, -20px) scale(0.98); }
    75% { transform: translate(-10px, 20px) scale(1.02); }
}

/* Main container */
.search-hub {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-branch) var(--space-stem);
    position: relative;
    z-index: 1;
}

/* Header styling */
.search-hub__header {
    text-align: center;
    margin-bottom: var(--space-canopy);
    animation: bloomIn 800ms ease-out;
}

.search-hub__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    color: var(--moss-dark);
    margin-bottom: var(--space-sprout);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-seed);
}

.title-prefix {
    font-size: 0.6em;
    color: var(--moss-medium);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.title-main {
    background: linear-gradient(135deg, var(--moss-dark), var(--leaf-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-hub__subtitle {
    color: var(--moss-medium);
    font-style: italic;
    opacity: 0.8;
}

/* Search container */
.search-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-hill);
    padding: var(--space-canopy);
    box-shadow: 
        0 10px 40px rgba(46, 74, 43, 0.1),
        0 2px 10px rgba(46, 74, 43, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    margin-bottom: var(--space-canopy);
}

/* Search input group */
.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--morning-mist);
    border-radius: var(--radius-boulder);
    border: 2px solid transparent;
    transition: all var(--transition-growth);
    overflow: hidden;
}

.search-input-group:focus-within {
    border-color: var(--leaf-accent);
    transform: translateY(-2px);
    box-shadow: 
        0 5px 20px rgba(127, 176, 105, 0.3),
        0 2px 8px rgba(127, 176, 105, 0.2);
}

.search-input {
    flex: 1;
    padding: var(--space-stem) var(--space-branch);
    font-size: 1.125rem;
    background: transparent;
    border: none;
    outline: none;
    color: var(--soil-dark);
}

.search-input::placeholder {
    color: var(--moss-medium);
    opacity: 0.7;
}

.search-button {
    padding: var(--space-stem) var(--space-branch);
    background: var(--leaf-accent);
    border: none;
    cursor: pointer;
    color: white;
    transition: all var(--transition-breeze);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: var(--moss-light);
    transform: scale(1.05);
}

.search-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Filter controls */
.filter-controls {
    margin-top: var(--space-stem);
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sprout);
    padding: var(--space-sprout) var(--space-stem);
    background: transparent;
    border: 2px solid var(--spring-green);
    border-radius: var(--radius-stone);
    color: var(--moss-dark);
    cursor: pointer;
    transition: all var(--transition-breeze);
    font-size: 0.875rem;
}

.filter-toggle:hover {
    background: var(--spring-green);
    transform: translateY(-1px);
}

.filter-icon {
    width: 16px;
    height: 16px;
    background: var(--moss-medium);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18v2.172a2 2 0 0 1-.586 1.414l-6.828 6.828A2 2 0 0 0 13 15.828V20l-4 2v-6.172a2 2 0 0 0-.586-1.414L1.586 7.586A2 2 0 0 1 1 6.172V4z'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform var(--transition-breeze);
}

.filter-toggle[aria-expanded="true"] .filter-icon {
    transform: rotate(180deg);
}

/* Advanced filters */
.advanced-filters {
    margin-top: var(--space-branch);
    padding: var(--space-branch);
    background: rgba(232, 245, 233, 0.5);
    border-radius: var(--radius-boulder);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-branch);
    transform-origin: top;
    transition: all var(--transition-growth);
}

.advanced-filters[aria-hidden="true"] {
    display: none;
}

.filter-group {
    border: none;
    padding: 0;
}

.filter-group legend {
    font-weight: 600;
    color: var(--moss-dark);
    margin-bottom: var(--space-sprout);
    display: flex;
    align-items: center;
    gap: var(--space-sprout);
}

.filter-option {
    display: flex;
    align-items: center;
    padding: var(--space-sprout);
    margin-bottom: var(--space-seed);
    cursor: pointer;
    border-radius: var(--radius-stone);
    transition: all var(--transition-breeze);
}

.filter-option:hover {
    background: rgba(127, 176, 105, 0.1);
}

.filter-option input {
    margin-right: var(--space-sprout);
    accent-color: var(--leaf-accent);
}

/* Search suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-boulder);
    box-shadow: 0 10px 30px rgba(46, 74, 43, 0.15);
    margin-top: var(--space-sprout);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.search-suggestions.active {
    display: block;
    animation: growDown 300ms ease-out;
}

@keyframes growDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: var(--space-stem);
    cursor: pointer;
    border-bottom: 1px solid var(--morning-mist);
    transition: all var(--transition-breeze);
    display: flex;
    align-items: center;
    gap: var(--space-sprout);
}

.suggestion-item:hover {
    background: var(--morning-mist);
    padding-left: var(--space-branch);
}

.suggestion-icon {
    width: 20px;
    height: 20px;
    background: var(--spring-green);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Quick actions */
.quick-actions {
    margin-bottom: var(--space-canopy);
}

.section-title {
    font-size: 1.5rem;
    color: var(--moss-dark);
    margin-bottom: var(--space-branch);
    display: flex;
    align-items: center;
    gap: var(--space-stem);
}

.section-title::before {
    content: '';
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--leaf-accent), transparent);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-stem);
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sprout);
    padding: var(--space-branch);
    background: white;
    border: 2px solid var(--spring-green);
    border-radius: var(--radius-boulder);
    cursor: pointer;
    transition: all var(--transition-growth);
    position: relative;
    overflow: hidden;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, var(--leaf-accent), transparent);
    opacity: 0;
    transition: opacity var(--transition-breeze);
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(127, 176, 105, 0.3);
    border-color: var(--leaf-accent);
}

.action-button:hover::before {
    opacity: 0.1;
}

.action-icon {
    width: 48px;
    height: 48px;
    background: var(--moss-light);
    border-radius: 50%;
    position: relative;
}

.action-icon--trending::after {
    content: '📈';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.action-icon--seasonal::after {
    content: '🌿';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.action-icon--evergreen::after {
    content: '🌲';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.action-icon--wild::after {
    content: '🦋';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.action-label {
    font-weight: 500;
    color: var(--moss-dark);
}

/* Search ecosystem */
.search-ecosystem {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-branch);
    margin-bottom: var(--space-canopy);
}

.recent-searches,
.popular-searches {
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-boulder);
    padding: var(--space-branch);
    backdrop-filter: blur(5px);
}

.ecosystem-title {
    font-size: 1.125rem;
    color: var(--moss-dark);
    margin-bottom: var(--space-stem);
    display: flex;
    align-items: center;
    gap: var(--space-sprout);
}

.ecosystem-icon {
    width: 24px;
    height: 24px;
    background: var(--spring-green);
    border-radius: 50%;
    position: relative;
}

.ecosystem-icon--recent::after {
    content: '🕐';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

.ecosystem-icon--popular::after {
    content: '⭐';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

.search-list {
    list-style: none;
}

.search-list li {
    padding: var(--space-sprout) 0;
    border-bottom: 1px solid var(--morning-mist);
    cursor: pointer;
    transition: all var(--transition-breeze);
    position: relative;
    padding-left: var(--space-branch);
}

.search-list li::before {
    content: '🌱';
    position: absolute;
    left: 0;
    opacity: 0.5;
    transition: all var(--transition-breeze);
}

.search-list li:hover {
    color: var(--leaf-accent);
    transform: translateX(5px);
}

.search-list li:hover::before {
    opacity: 1;
}

/* Footer */
.search-hub__footer {
    text-align: center;
    padding: var(--space-branch) 0;
}

.growth-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sprout);
    padding: var(--space-sprout) var(--space-branch);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-hill);
    color: var(--moss-medium);
    font-size: 0.875rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--leaf-accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Animations */
@keyframes bloomIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .search-hub {
        padding: var(--space-stem);
    }
    
    .search-container {
        padding: var(--space-branch);
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-ecosystem {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
:focus-visible {
    outline: 3px solid var(--leaf-accent);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--morning-mist);
}

::-webkit-scrollbar-thumb {
    background: var(--moss-light);
    border-radius: var(--radius-stone);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--moss-medium);
}