/* --- General Search Form Styles --- */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    /* Glassmorphism Effect */
    background: rgba(241, 245, 249, 0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 9999px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Focus State */
.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #0d9488; /* Teal accent */
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.search-input-wrapper:focus-within .search-icon {
    color: #0d9488;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #1e293b;
    padding: 10px 16px 10px 42px;
    border-radius: 9999px;
}

.search-input::placeholder {
    color: #94a3b8;
    transition: opacity 0.3s ease;
}

/* --- Desktop Search (.nav-search) --- */
.nav-search {
    display: none; /* Hidden by default for mobile */
}

@media (min-width: 1024px) {
    .nav-search {
        display: flex;
        align-items: center;
        margin-left: 20px;
        /* FIX: Allow search to shrink rather than overflow */
        flex-shrink: 1; 
        min-width: 40px; 
    }
    
    .nav-search .search-input {
    /* 160px was too narrow — left only ~102px of text area which
       cut the tail of the "Search tours..." placeholder. 200px
       comfortably fits the placeholder with breathing room. */
    width: 200px; 
    max-width: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

.nav-search .search-input:focus {
    width: 260px; 
    }
}

/* --- Mobile Search (.mobile-search-container) --- */
.mobile-search-container {
    padding: 12px 24px;
    display: block;
    width: 100%;
}

/* Ensure mobile version is visible in menu */
.mobile-search-container .search-input-wrapper {
    background: #f1f5f9;
}

@media (min-width: 1024px) {
    .mobile-search-container {
        display: none; /* Hide when desktop version is active */
    }
}

/* --- Accessibility & Polish --- */
.search-input:focus::placeholder {
    opacity: 0.5;
}