/* Theme Name: Twenty Twenty-Five Child
   Template: twentytwentyfive
   Version: 1.0
   Author: Andreas Krause
*/
@media (max-width: 768px) {
  .wp-block-site-title,
  .wp-block-site-tagline {
    display: none !important;
  }


/* ❌ Startseiten-Rahmen komplett entfernen – auch bei Inaktivität */
.wp-block-home-link {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* ⛔ Sicherheitsnetz: Wenn Startseite nicht aktiv ist, auch Link selbst neutralisieren */
.wp-block-home-link:not(.current-menu-item) a {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
}

/* ✅ Aktive Seite einheitlich abgerundet markieren */
.wp-block-navigation__container a[aria-current],
.wp-block-navigation__container .current-menu-item > a {
  outline: 2px solid #003859;
  outline-offset: 4px;
  border-radius: 6px;
  background: transparent;
}
}

.lupe-icon {
  color: white !important;
}

@media (max-width: 600px) {
  .mobile-search-stacked.small-search-button .wp-block-search__inside-wrapper {
    flex-direction: column;
    gap: 0.5em;
  }

  .mobile-search-stacked.small-search-button .wp-block-search__input {
    width: 100%;
  }

  .mobile-search-stacked.small-search-button .wp-block-search__button {
    width: auto !important;      /* ← verhindert 100% Breite */
    align-self: flex-start;      /* ← linke Ausrichtung innerhalb des Spaltenlayouts */
    padding: 4px 10px !important;
    font-size: 0.8em !important;
    line-height: 1.2;
    min-width: unset !important; /* falls Theme das setzt */
    box-sizing: border-box;
  }
}

add_action('pre_get_posts', function($query) {
    if (!is_admin() && $query->is_main_query()) {
        // Für Kategorie-Archive: Beiträge + ec_event einbinden
        if ($query->is_category()) {
            $query->set('post_type', ['post', 'ec_event']);
        }

        // Für Schlagwort-Archive ebenfalls (optional)
        if ($query->is_tag()) {
            $query->set('post_type', ['post', 'ec_event']);
        }
    }
});

