<?php
// Eindeutige ID für jede Instanz des Suchformulars
$search_id = 'search-field-' . uniqid();
?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url('/') ); ?>">
    <div class="search-form-inner">
        <label for="<?php echo esc_attr( $search_id ); ?>" class="screen-reader-text">
            <?php _e('Suche nach:', 'minecraft-modern-theme'); ?>
        </label>
        <input
            type="search"
            id="<?php echo esc_attr( $search_id ); ?>"
            class="search-field"
            placeholder="<?php esc_attr_e('Suche...', 'minecraft-modern-theme'); ?>"
            value="<?php echo esc_attr( get_search_query() ); ?>"
            name="s"
            autocomplete="off"
        >
        <button type="submit" class="search-submit" aria-label="<?php esc_attr_e('Suchen', 'minecraft-modern-theme'); ?>">
            <i class="fas fa-search"></i>
        </button>
    </div>
</form>