@media (min-width: 1025px) {
  /* Select the three-column Optima row whose middle column holds the logo. */
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) min(26%, 340px) minmax(0, 1fr);
    align-items: center;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 1366px !important;
    margin-inline: auto !important;
  }

  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column {
    width: 100% !important;
    min-width: 0;
  }
}

/* Logo red: active desktop navigation, including its underline. */
@media (min-width: 1025px) {
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child :is(a[aria-current="page"], a[aria-current="true"], a.elementor-item-active, a.active, a.current, .active > a, .current > a, .current-menu-item > a, .current_page_item > a, .elementor-active > a),
  body#index #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child a:is([href="https://strefafoteli.pl/"],[href="https://strefafoteli.pl"],[href="/"],[href="https://strefafoteli.pl/index.php"]),
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child a:hover {
    color: #D62339 !important;
    text-decoration-color: #D62339 !important;
    border-bottom-color: #D62339 !important;
  }
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child :is(a[aria-current="page"], a[aria-current="true"], a.elementor-item-active, a.active, a.current, .active > a, .current > a, .current-menu-item > a, .current_page_item > a, .elementor-active > a):before,
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child :is(a[aria-current="page"], a[aria-current="true"], a.elementor-item-active, a.active, a.current, .active > a, .current > a, .current-menu-item > a, .current_page_item > a, .elementor-active > a):after,
  body#index #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child a:is([href="https://strefafoteli.pl/"],[href="https://strefafoteli.pl"],[href="/"],[href="https://strefafoteli.pl/index.php"]):before,
  body#index #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child a:is([href="https://strefafoteli.pl/"],[href="https://strefafoteli.pl"],[href="/"],[href="https://strefafoteli.pl/index.php"]):after,
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child a:hover:before,
  #header .elementor-row:has(> .elementor-column:nth-child(2) .elementor-widget-posLogo):has(> .elementor-column:nth-child(3):last-child) > .elementor-column:first-child a:hover:after {
    background-color: #D62339 !important;
    border-color: #D62339 !important;
  }
}
