/* Container and icon styling */
.search-bar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    color: white;
    position: relative;
}

.search-icon {
    font-size: 24px;
    color: white;
    transition: opacity 0.3s ease;
}

.search-input {
    display: none; /* Initially hidden */
    font-size: 18px;
    color: white;
    background: transparent;
    border: none;
    border-bottom: 2px solid white;
    padding: 5px;
    outline: none;
    transition: width 0.4s ease;
    width: 0; /* Start with width 0 */
}

/* Expand input and hide icon on click */
.search-bar-container.active .search-input {
    display: inline-block;
    width: 200px;
}

.search-bar-container.active .search-icon {
    opacity: 0; /* Hide icon */
}

/* Center the search bar */
.search-bar-container {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-bar-container {
        width: 100%;
        justify-content: center;
    }
    .search-bar-container.active .search-input {
        width: 100%;
        max-width: 300px;
    }
}
